Reputation: 3440
I would like to be able to change the STARTUPINFO
values, right after CreateProcess
has been called (suspended).
So the new remote/child process can get custom GetStartupInfo
values as soon as it starts.
How could I achieve this?
More Info:
I would like to pass arbitary data to the child process.
Regarding to this article: http://www.catch22.net/tuts/undocumented-createprocess it is possible to do so with the reserved2
members from the STARTUPINFO
structure. This method works but has a limit of 65536 bytes. A theoretical solution in order to pass more than 65536 bytes would be if you:
VirtualAllocEx
in the child processWriteProcessMemory
reserved2
members with the address from Step 2GetStartupInfo
and gets the dataUpvotes: 0
Views: 835
Reputation: 612954
I'm not aware of any supported way for you to do what you ask. However, I suggest an alternative solution to the root problem.
lpReserved2
anyway since the documentation tells you to set it to NULL
.Indeed, there are many variants on this approach, but command line arguments are the way to pass information to a new process.
Upvotes: 3