Hello,
I am developing with xHarbour(version dated 17/11/2-11 from xHarbout.com and Fivewin for Harbour. I realise this is an xHarbour issue rather than a Fivewin issue, but I am hoping someone on this forum can help me.
I am trying to get DLLCAL() working wit little to no success. My sample code and (what it returns) can be seen below. All numbers are zero and the string is blank.
Any suggestions or help would be appreciated.
Cheers,
Pat Driscoll
#include "CStruct.ch" // required for "typedef struct"
#include "Wintypes.ch" // required Windows C data types
pragma pack(4) // all Windows API structures
// are 4 byte aligned
// structure declaration taken via
// copy&paste from Windows SDK
typedef struct _OSVERSIONINFOEX { ;
DWORD dwOSVersionInfoSize; // ˆ this ";" must be added
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
TCHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEX, POSVERSIONINFOEX, LPOSVERSIONINFOEX;
#define DC_CALL_STD 0x0020
PROCEDURE Main()
LOCAL oVerInfo
// Create OSVERSIONINFOEX structure object
oVerInfo := (struct OSVERSIONINFOEX)
// assign structure size to structure member
oVerInfo:dwOSVersionInfoSize := oVerInfo:sizeOf()
// pass structure object by reference to DllCall()
// (it is an OUT parameter)
DllCall( "Kernel32.dll", DC_CALL_STD , "GetVersionEx", @oVerInfo )
// display result of API
MsgInfo(str(oVerInfo:dwMajorVersion)) // result: 0
MsgInfo(str(oVerInfo:dwMinorVersion)) // result: 0
MsgInfo(str(oVerInfo:dwBuildNumber)) // result: 0
// this member contains a byte array
// retrieve it as character string
MsgInfo(oVerInfo:szCSDVersion:asString()) // result: blank spaces
RETURN
Australia