| Message: 93640 |
 |
BY: Jarmo Pertman (juuser) DATE: 2010-05-15 19:56 SUBJECT: RE: pointers and whatnot in Win32::API i'll add some more information in here.
GMEM_FIXED = 0
z = GlobalAlloc(0, x) # x is some large number
d = GlobalLock(z)
...
GetDIBits(_, _, _, _, d, _, _) # _ are just some variables, which are not necessary to show in here
...
# b and c will get declared with Array#pack, so they are just some binary data
# and now this line from the previous post comes with slight modifications due to previous lines and understanding of how DL::PtrData#to_s actually works - i'm using #inspect in here to get also "\\000"-s from the binary:
a = b.inspect + c.inspect # + d
So, as far as I understand then I have to get somehow binary data from memory, which is behind pointer d, right? How can i do it? And if i can, then would this line be correct?
a = b.inspect + c.inspect + d.inspect
Jarmo | |