+2  A: 

This has to do with session isolation in Vista or higher versions of Windows. Check out the source or disassembly for password dumping tools like Cain and Abel that purport Vista functionality. Essentially the process is the same but you'll be calling a different function for CreateRemoteThread (sorry, I don't think the function is exported, you just have to find it, so disassembly of working software is probably the best bet).

mrduclaw
I'll look into the issue with CreateRemoteThread tonight. Thanks for the info and tip.However, why are 0 bytes being written with WriteProcessMemory? Is there a different/parallel function for this also?Thanks for the help. Any other tips would be greatly appreciated.
pcorey
I can understand no bytes being written, but not the lack of an error code ... though come to think of it, isn't that function the one most debuggers use too?
SamB
+2  A: 

You could try using RtlCreateUserThread, instead of CreateRemoteThread. This routine doesn't care what session the target process lives in. Just remember to have the thread call RtlExitUserThread before it ends. These threads don't clean up after themselves, like the CreateThread/CreateRemoteThread ones do.

The reactos code can give you a good look at what these routines are doing.

otherchirps