问题
For a Win32 application, what is the command line that I call GetCommandLine to get and send it as parameter for WinMain?
回答1:
Ignoring issues of encoding and information loss, and glossing over what's a macro and what's a function, GetCommandLine
is an API function that retrieves the original command line passed to the process, while WinMain
is a function defined by your code that is called by Microsoft's C and C++ runtime support, and that is passed a copy of the part of the command line extending from the first argument and on, i.e. not including the program name/path at the start of the original command line.
来源:https://stackoverflow.com/questions/24510167/what-is-the-command-line-at-getcommandline-and-at-winmain-api