Jump to content

  • Log In with Google      Sign In   
  • Create Account


argv - lpCmdLine?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Dharma   Members   -  Reputation: 122

Like
Likes
Like

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

Sponsor:

#2 Oluseyi   Staff Emeritus   -  Reputation: 1678

Like
Likes
Like

Posted 15 October 2001 - 03:50 AM

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

#3 Dharma   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 October 2001 - 07:39 AM

Thank you Oluseyi, this was just what I needed

Mvh Mario..

#4 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 15 October 2001 - 03:22 PM

If using Visual C++, use the __argc and __argv macros




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS