Process Environment Information

An executing process's environment consists of the command line, the process startup parameters, and the environment variables. A process can return this data at any time during its execution by calling the appropriate Win32 API function. This data is first set in the call to CreateProcess, which creates the application.

GetCommandLine returns the command line. The command line consists of the pathname of the process in quotes followed by the arguments. The command line parameters also can be retrieved from the command line string passed to WinMain when the process is started, but this command line does not contain the pathname of the process.

GetStartupInfo returns the STARTUPINFO structure of the CreateProcess ...

Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.