argv - lpCmdLine?
3 replies to this topic
Members - Reputation: 122
Posted 14 October 2001 - 10:41 PM
Hi.. How can I get the command line argument (argv in dos) in windows? I'm only used to dos programming and cant find the way to get it in windows. So can someone please help me how to obtain the string in lpCmdLine? Thanks in advance! Regards Mario.. Edited by - Dharma on October 15, 2001 10:51:09 AM
Staff Emeritus - Reputation: 1678
Posted 15 October 2001 - 03:50 AM
From an MSDN Library article on WinMain:
The third parameter, lpszCmdParam, is a long (FAR) pointer to a null-terminated (ASCIIZ) string containing any command-line parameters passed to the program instance. Although the command-line parameters are provided by Windows rather than by a conventional (DOS) command line, the user can specify these parameters through the Run dialog box invoked from the Start menu. In general, however, Windows applications rely on dialog boxes for specific input and on .INI entries for default values, rather than expecting command-line parameters
The full document can be found here.
Edited by - Oluseyi on October 15, 2001 10:51:39 AM