Defense in depth — the Microsoft way (part 27): the command line you get differs from the command line I use to call you

Posted by Stefan Kanthak on Feb 01

Hi @ll,

on Windows, the command line an application receives can differ
from the command line the calling application supplies to
CreateProcess*().

The documentation of GetCommandLine()
<https://msdn.microsoft.com/en-us/library/ms683156.aspx> tells:

| Note The name of the executable in the command line that
| the operating system provides to a process is not necessarily
| identical to that in the command line that the calling process
|…

Leave a Reply