Re: [Dev-C++] main( int argc, char* argv[] ) equivalents at winmain(...)?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jason H. <jas...@bt...> - 2001-12-18 18:41:58
|
The Arguments list for WinMain is:
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
);
As you can see there is a pointer to the command line, which is a null
terminated string. As for argc I think you need to parse the string yourself
in order to determine seperate options etc...
Jason.
----- Original Message -----
From: "Gregor Peter" <pe...@in...>
To: "dev cpp" <dev...@li...>
Sent: Tuesday, December 18, 2001 1:44 AM
Subject: [Dev-C++] main( int argc, char* argv[] ) equivalents at
winmain(...)?
> How to acsess parameters of a Windowsprogramm?
>
> A console aplication with those lines in main() ...
>
>
> int main( int argc, char* argv[]){
> statements;
> return 0;
> }//main
>
> ... which gets started like:
>
> main_exe option1 option2 ... optionXY
>
> ... is able to acsess it's calling parameters.
>
> How do I acess parameters provieded to my programm like the above under
> windows?
> Where do these parameters (argc argv[]) hide in WinMain( ... ) ?
>
> THANX
> Gregor (pe...@in...)
>
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|