A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/windows/desktop/api/processenv/nf-processenv-getcommandlinew below:

GetCommandLineW function (processenv.h) - Win32 apps

Retrieves the command-line string for the current process.

Syntax
LPWSTR GetCommandLineW();
Return value

The return value is a pointer to the command-line string for the current process.

The lifetime of the returned value is managed by the system, applications should not free or modify this value.

Console processes can use the argc and argv arguments of the main or wmain functions by implementing those as the program entry point. GUI processes can use the lpCmdLine argument of the WinMain or wWinMain functions by implementing those as the program entry point.

To convert the command line to an argv style array of strings, pass the result from GetCommandLineW to CommandLineToArgvW.

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 gives to the

CreateProcess

function. The operating system may prepend a fully qualified path to an executable name that is provided without a fully qualified path.

Note

The processenv.h header defines GetCommandLine as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements Requirement Value Minimum supported client Windows XP [desktop apps | UWP apps] Minimum supported server Windows Server 2003 [desktop apps | UWP apps] Target Platform Windows Header processenv.h (include Windows.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2) Library Kernel32.lib DLL Kernel32.dll See also

CreateProcess

Process and Thread Functions


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4