Listing 2 Accessing the command-line arguments
LPCTSTR lpszCmdLine; lpszCmdLine = GetCommandLine(); if(*lpszCmdLine == '\"') { while( (*(++lpszCmdLine) != '\"') && (*lpszCmdLine != '\0')) {} if ( *lpszCmdLine == '\"') { ++lpszCmdLine; } } else { while(*lpszCmdLine > ' ') { ++lpszCmdLine; } } while( *lpszCmdLine && (*lpszCmdLine <= ' ')) { ++lpszCmdLine; } return lpszCmdLine;