Page 1 of 1

createRemoteThread() problem...

PostPosted: Fri Nov 26, 2010 10:57 am
by maybnxtseasn
for some reason the createremotethread() function is failing when i try it on calc.exe, or notepad.exe....when i use getLastError() it returns an error code of 5 : ACCESS_DENIED

anyone have any ideas how/what i am doing wrong?

and yes i am using OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcessID);
-thx

Re: createRemoteThread() problem...

PostPosted: Fri Nov 26, 2010 2:47 pm
by L. Spiro
http://msdn.microsoft.com/en-us/library/ms682437(v=VS.85).aspx

A handle to the process in which the thread is to be created. The handle must have the PROCESS_CREATE_THREAD, PROCESS_QUERY_INFORMATION, PROCESS_VM_OPERATION, PROCESS_VM_WRITE, and PROCESS_VM_READ access rights, and may fail without these rights on certain platforms.



L. Spiro

Re: createRemoteThread() problem...

PostPosted: Fri Nov 26, 2010 4:21 pm
by maybnxtseasn
yea sorry about the above openProcess i didnt paste it from my program..i tried all those. i even tried the all_access macro in the function openProcess()

Re: createRemoteThread() problem...

PostPosted: Fri Nov 26, 2010 7:01 pm
by L. Spiro
Give your process debug permissions or run as administrator.


L. Spiro

Re: createRemoteThread() problem...

PostPosted: Sat Nov 27, 2010 8:18 am
by denispn
The same heappens to me, but i'm quite sure that it is because calc.exe and notepad.exe are 64-bits and your program is 32-bits.

Cheers,
ctl3d32