I'm trying to get BlitzMax to call a Windows API function, without much success... Anyone can shed some light on what I need to do here?
It compiles without error, but attempting to run it returns the error: Attempt to call uninitialized function pointer
Any help would be appreciated!
Global SetSystemPowerState(fSuspend, fForce) "win32" lib = LoadLibraryA ("kernel32.dll") If lib SetSystemPowerState = GetProcAddress(lib, "SetSystemPowerStateA") Else Print "Dead"; End EndIf SetSystemPowerState(0,0)
It compiles without error, but attempting to run it returns the error: Attempt to call uninitialized function pointer
Any help would be appreciated!