As it was correctly suggested, The lpCmdLine parameter gives the CommandLine
argument for WinMain .But it doesnt include the exe name.It only gives parameters
which are separated by spaces(char 32).

To get complete commandline argument like we get on DOS try ,

char *CmdArg=GetCommandLine();

Now CmdArg Contains the entire commandline arguments including exepath separated
by blanks.

So to retrieve our exe name just simply search for first blank.
Some thing like..

/*--------------------------------*/
char *CmdArg=GetCommandLine();
char *ExePath= strchr(CmdArg,32); //Searching First blank space

if(ExePath!=NULL)
*ExePath='\0';

MessageBox(NULL,ExePath,"ExePath",MB_OK);

/*-----------------------------------*/

The above gives the messagebox with exepath. When commandline contains no
arguments then ExePath would be NULL.

Hope this will do.
Thanking you,
Yours,
P.GopalaKrishna.


"Johnny" <p166@freemail.hu> wrote:
>
>Hi!
>
>I tried what you say, but how can I get these datas? In DOS it was very

simple
>but in Windows how can I get it? (my system is Win98SE)
>
>"jonnin" <jonnin@vol.com> wrote:
>>
>>should be the first commandline argument (you can add these to windows

programs
>>as well). This may vary on windows versions, so double check what happens
>>here.