CallDLL
Blitz3D Forums/Blitz3D Programming/CallDLL
| ||
I tried this code example and the compiler returns a "Function Not Found" error. lpMemoryStatus = CreateBank(32) CallDLL("kernel32.dll","GlobalMemoryStatus",lpMemoryStatus) TotalSysMem = PeekInt (lpMemoryStatus,8) AvailSysMem = PeekInt (lpMemoryStatus,12) FreeBank lpMemoryStatus Print "AvailSysMem = " + AvailSysMem Print "TotalSysMem = " + TotalSysMem WaitKey() End And the API was listed in the manual. |
| ||
CallDLL is the "old" technique for calling a DLL, you should use decls instead... see this for kernel32 declarations http://www.blitzbasic.com/codearcs/codearcs.php?code=1180 look under spec and utils for information about dlls and userlibs. If I remember well about CallDLL, you should not put ".dll" in the first parameter and if you declare a in_bank you should declare as well a out_bank, you can put 0 as parameter if you don't use one of these. hope this helps |