hey all, i have been scanning the net for answers to this question for days now and im still making no progress so i beg for your help oh mighty guru's of computer wisdom :)
my problem is my readprocessmemory function is returning unicode.. here is my code
kernel32 = ctypes.windll.kernel32
PROCESS_QUERY_INFORMATION = 0x0400
PROCESS_VM_READ = 0x0010
pid = int(raw_input("Enter PID: "))
hproc = kernel32.OpenProcess(PROCESS_QUERY_INFORMATION |PROCESS_VM_READ, False, pid)
lpbaseaddr = 16799644
read_buff = ctypes.create_string_buffer(4)
bytread = ctypes.c_ulong(0)
kernel32.ReadProcessMemory(hproc, lpbaseaddr, read_buff,
4, ctypes.byref(bytread))
print read_buff.raw #i also tried read_buff.value
ok thats my code.. i know the value at that address is 50 because i used cheat engine to make it 80 :) my program's print read_buff returns "P".. if i make the value of that address 81 with cheat engine and run my program it returns the value "Q". i been messing around and unichr(80) returns P and unichr(81) returns Q. there is obviously a problem with create_string_buff. should i be using a byte buffer or integer buffer and how would i do that? using unichr() works for a few valeus but say the address value is 800. unichr(800) obviously wont work.. PLS HELP!!!!! im looking for the read_buff to return 50 or 60 or 800 etc