winpe - How does Windows pass arguments to a program? (And is there a SetCommandLine function?) -


How does entry point get logic from the command line? I looked through a disassembly of one and found that it calls __ getmainargs to get the argument. Is there any way of " __setman args "? I know that CreateProcess already does this but I want to see how CreateProcess does this

The AFAIK logic has been passed as a string in memory, so there is really just one argument - many are divided by your program, the kernel receives the argument from the CreateProcess () call and Keeps it in a predefined memory space while setting a new process.

But this is only my semi-educated guess

Comments