🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

argv - lpCmdLine?

Started by
2 comments, last by Dharma 22 years, 8 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..
Advertisement
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
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