Ok, I need a little help with putting MakeLong in python. I'm assuming it is something like GetDWORD and GetWORD.
def MakeDWORD(n):
return struct.pack("< I", n)
Banana fanna fo fanna showed me this code and helped me with it. I'm guessing that since both MakeLong and MakeWORD/DWORD use CopyMemory in VB6 that in Python they would both use the struct module. For MakeLong I have,
def MakeLong(x):
if len(x) < 4:
pass
return struct.pack("< L", x)
My problem is that I'm not sure if I use L for unsigned long or if I use something else. And this probably isn't the only problem.
Why are you making a long when you already have a DWORD?
DWORD is the exact same thing as an unsigned long.
Umm, Oh, thanks.
Yegg, will you please RTFM. I've told you twice already; this is number 3. There's a nice easy table for you to use.
Quote from: Zakath on December 14, 2004, 02:21 AM
Why are you making a long when you already have a DWORD?
DWORD is the exact same thing as an unsigned long.
The reason why, is because he uses code that uses the "MakeLong" function, as well as the "Make DWORD", not knowing they are the same thing. IMHO