Hi MrBCX:
If I recall correctly, claims were made in the past that tcc would compile 64 bit inlne assembly code. I never tried it. It would be interesting to see if BCX_DYNACALL worked as a 64 bit tcc compile.
Maybe I'll take up that challenge just to satisfy curiosity.
The
MakeGuidFromString () that I posted yesterday was initially much easier to
implement but
limited to 32-bit apps only because of its dependency on Dynacall:FUNCTION MakeGuidFromString (MyStr$, MyGUID
AS LPGUID)
FUNCTION = UuidFromString (
LIB "Rpcrt4.dll", MyStr$, MyGUID)
END FUNCTION
Overcoming that 32-bit limitation is why I decided rewrite it thusly :
'FUNCTION MakeGuidFromString (MyStr$, MyGUID AS LPGUID)
' '***************************************************
'! typedef int( __stdcall *UIDFS )(PCHAR,LPGUID);
' '***************************************************
' DIM hDll AS HMODULE
' DIM MakeUUID AS UIDFS
' LOCAL RetCode
' hDll = LOADLIBRARY("Rpcrt4.dll")
' IF hDll = NULL THEN
' PRINT "Could not load Rpcrt4.dll"
' FUNCTION = 0
' END IF
' $IFDEF UNICODE
' MakeUUID = GetProcAddress(hDll, "UuidFromStringW")
' $ELSE
' MakeUUID = GetProcAddress(hDll, "UuidFromStringA")
' $ENDIF
' IF MakeUUID = NULL THEN
' PRINT "Could not locate the function: UuidFromString()"
' FreeLibrary(hDll)
' FUNCTION = 0
' END IF
' RetCode = MakeUUID (MyStr$, MyGUID)
' FreeLibrary(hDll)
' FUNCTION = RetCode
'END FUNCTION