Re: Noob, learning how to use dll's.
- Posted by Archarios <archarios at v?rizon?net> Jun 13, 2008
- 778 views
See http://msdn.microsoft.com/en-us/library/aa366589(VS.85).aspx for GlobalMemoryStatusEx. DLL = open_dll("kernel.dll") GMSx = define_c_func(DLL,"GlobalMemoryStatusEx",{C_POINTER},C_INT) mem = allocate(64) result = c_func(GMSx,{mem}) free(mem) I can't remember the exact size of DWORD and DWORDLONG, I think it's 4 and 8. You'll have to peek(mem+offset,num_bytes) to get the information you want, and multiply it out to convert it from a sequence of bytes to a number. Hope this helps, Mike Thanks for the help, exactally what I needed! DWORD is 8 bytes so a DWORDLONG is also 8 but unsigned...right and why do you ask? P.S. I copied and pasted your message cause the quote didn't come out well.