Thread: Input in Command Line Parameters

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    161

    Talking Input in Command Line Parameters

    Hi, ok, a newbie question:

    I want to give a parameter to this program :


    Code:
    ...
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char * lpCmdLine, int  nCmdShow)
    
    {
      WIN32_FIND_DATA FindFileData;
      HANDLE hFind;
      char search[20]="SETI.exe";
    ...

    I want char search[20]="SETI.exe"; something like char search[20]=lpCmdLine;

    but it says it's wrong

    (I want to create an exe that has to be used like myprogram.exe -SETI.exe)

    I know how to do with main(..) but not with WINAPI WinMain (I need it)

    thanx for help

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    strncpy

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    161
    thanx I will try

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I would love some input on my BST tree.
    By StevenGarcia in forum C++ Programming
    Replies: 4
    Last Post: 01-15-2007, 01:22 AM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  3. Structure and Linked List User Input Question
    By kevndale79 in forum C Programming
    Replies: 16
    Last Post: 10-05-2006, 11:09 AM
  4. Stupid Question
    By digdug4life in forum C++ Programming
    Replies: 22
    Last Post: 05-17-2005, 11:43 AM
  5. Help with Input Checking
    By Derek in forum C Programming
    Replies: 7
    Last Post: 06-17-2003, 03:07 AM