Results 1 to 4 of 4

Thread: command line parameters

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    command line parameters

    This may be a stupid question, but what is passed into winmain with regard to the command line parameters?

    if it for example:
    "key32.exe /a"
    or is it just the extra parts: e.g.
    "/a"

    and if so is it just a string to take apart?! or can you simply do a case statment or if statement?

    if(lpszCmdLine == "\a")
    {
    do this..
    }

    cheers in advance

    Andy

  2. #2
    jim mcnamara
    Guest
    It's the whole command line - name of file plus any arguments

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't think the file name gets passed to WinMain - you need to use GetModuleFileName.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Why don't you just print it to stdout and take a look?
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width