Hi Roland,
Yes, you identified the problem. The method prototypes had untyped params. They should default to sys, but it is good to be specific anyway:
sys CoInitialize lib "Ole32.dll" (sys pvReserved)
sys CoUninitialize lib "Ole32.dll" ()
sys DirectDrawCreate lib "Ddraw.dll" (sys lpGUID, lplpDD, pUnkOuter)
sys freq
extern virtual
class DirectDraw7
sys QueryInterface(sys a, b)
sys AddRef()
sys Release()
sys Compact()
sys CreateClipper(sys a, b, c)
sys CreatePalette(sys a, b, c, d)
sys CreateSurface(sys a, b, c)
sys DuplicateSurface(sys a, b)
sys EnumDisplayModes(sys a, b, c, d)
sys EnumSurfaces(sys a, b, c, d)
sys FlipToGDISurface()
sys GetCaps(sys a, b)
sys GetDisplayMode(sys a)
sys GetFourCCCodes(sys a, b)
sys GetGDISurface(sys a)
sys GetMonitorFrequency(sys a)
sys GetScanLine(sys a)
sys GetVerticalBlankStatus(sys a)
sys Initialize(sys a)
sys RestoreDisplayMode()
sys SetCooperativeLevel(sys a, b)
sys SetDisplayMode(sys a, b, c, d, e)
sys WaitForVerticalBlank(sys a, b)
sys GetAvailableVidMem(sys a, b, c)
sys GetSurfaceFromDC(sys a, b)
sys RestoreAllSurfaces()
sys TestCooperativeLevel()
sys GetDeviceIdentifier(sys a,b)
sys StartModeTest(sys a,b,c)
sys EvaluateMode(sys a,b)
end class
end extern
'#recordof DirectDraw7
CoInitialize 0
DirectDraw7 * DD1
if not DirectDrawCreate(0, @@DD1, 0)
DD1.GetMonitorFrequency(@freq)
print ("Your monitor's current frequency is " freq "Hz.")
DD1.Release
else
print ("Failed to create DirectDraw1 surface. Monitor frequency unknown.")
end if
CoUninitialize