Advertisement

argv - lpCmdLine?

Started by October 15, 2001 04:41 AM
2 comments, last by Dharma 23 years, 2 months ago
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
Warm regardsMario..
quote: 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
Advertisement
Thank you Oluseyi, this was just what I needed

Mvh Mario..
Warm regardsMario..
If using Visual C++, use the __argc and __argv macros

This topic is closed to new replies.

Advertisement