I'am looking for use API Windows with Type.
For exemple the GlobalMemoryStatus command must have a MEMORYSTATUS Structure to work.
I try with an example I've found on the API Guide Software. But nothing :(
Here's the code I test :
This, prints a value but not really the total physical memory...
How API works with structure like this ?
Here's the example I've Found on API Guide software (vb example) :
So, How can I code the GlobalMemoryStatus on Bmax using the API ?
Thx in advance :)
For exemple the GlobalMemoryStatus command must have a MEMORYSTATUS Structure to work.
I try with an example I've found on the API Guide Software. But nothing :(
Here's the code I test :
'Status de la mémoire **API Windows** Type MEMORYSTATUS Field dwLength:Long Field dwMemoryLoad:Long Field dwTotalPhys:Long Field dwAvailPhys:Long Field dwTotalPageFile:Long Field dwAvailPageFile:Long Field dwTotalVirtual:Long Field dwAvailVirtual:Long EndType Global GlobalMemoryStatus(lpBuffer:Byte Ptr) kernel32 = LoadLibraryA("kernel32.dll") If Kernel32 GlobalMemoryStatus = (GetProcAddress(kernel32,"GlobalMemoryStatus")) Else Notify("Impossible d'ouvrir la lib") EndIf Local Memoire:MEMORYSTATUS = New MEMORYSTATUS GlobalMemoryStatus(Memoire) Print Memoire.dwTotalPhys
This, prints a value but not really the total physical memory...
How API works with structure like this ?
Here's the example I've Found on API Guide software (vb example) :
Private Type MEMORYSTATUS dwLength As Long dwMemoryLoad As Long dwTotalPhys As Long dwAvailPhys As Long dwTotalPageFile As Long dwAvailPageFile As Long dwTotalVirtual As Long dwAvailVirtual As Long End Type Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS) Private Sub Form_Load() 'KPD-Team 1998 'URL: <a href="http://www.allapi.net/" target="_blank">http://www.allapi.net/</a> 'E-Mail: KPDTeam@... Dim MemStat As MEMORYSTATUS 'retrieve the memory status GlobalMemoryStatus MemStat MsgBox "You have" + Str$(MemStat.dwTotalPhys / 1024) + " Kb total memory and" + Str$(MemStat.dwAvailPageFile / 1024) + " Kb available PageFile memory." End Sub
So, How can I code the GlobalMemoryStatus on Bmax using the API ?
Thx in advance :)