I'm using Visual C++.NET. I need to pass a port number to my gui. What the syntax for passing arguments to "int __stdcall WinMain()." For regular C++ it would be "int main(int argc, char* argv[])" Thanks.
DotNetUser
0
Junior Poster in Training
Recommended Answers
Jump to Postlook up in your helpfiles or at msdn....
the third param to WinMain to get command line as ascii
GetCommandLine() to get the command line as unicode
CommandLineToArgvW() to convert it to an array of strings if necessary
Jump to PostStraight from MSDN.com ...
int WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
);lpCmdLine [in] Pointer to a null-terminated string specifying the command line for the application, excluding the program name. …
All 8 Replies
Stoned_coder
6
Junior Poster
BountyX
7
Posting Whiz in Training
DotNetUser
0
Junior Poster in Training
Stoned_coder
6
Junior Poster
DotNetUser
0
Junior Poster in Training
Stoned_coder
6
Junior Poster
DotNetUser
0
Junior Poster in Training
cpg
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.