Re: Noob, learning how to use dll's.

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu