Computer Engineers

 
Home | Computer engineering other top | Fiber / Wireless / Copper Tran | Semiconductor engineering
  Position:HOME>Programming language engineeri>Article Content
argc argv in winmain
Source:Internet Author:Unknow Pubdate:2008-04-14  
ThomasGGiusepe (Computer) 11 Oct 03 13:58
Hi there,

How to get argc and argv with winmain ?

Thanks!
Tom

zeitghost (Computer) 16 Oct 03 11:45
This comes out of an ancient copy of VC++:

int PASCAL WinMain(hinstCurrent, hinstPrevious, lpCmdLine, nCmdShow)

HINSTANCE hinstCurrent;    
HINSTANCE hinstPrevious;    
LPSTR lpszCmdLine;    
int nCmdShow;    


The WinMain function is called by the system as the initial entry point for a Windows application.

Parameter    Description

hinstCurrent    Identifies the current instance of the application.
hinstPrevious    Identifies the previous instance of the application.
lpszCmdLine    Points to a null-terminated string specifying the command line for the application.

字串6




ThomasGGiusepe (Computer) 17 Oct 03 23:22
I've implemented it about 5 days ago. Thanks for your feedback anyway. Best wishes.

Maayan (Computer) 7 Nov 04 10:09
Well, how did you do that?
I want to use the getopt module in order to retrieve the arguments out of the command-line. How can I do that?
As I see it, there are 2 options:
1. Get the argv/argc and use getopt.
2. Use some mechanism on Windows that I don't know about.

Erez



(Click:

Previous:SQL multi-queries...beginner   Next:How to get command-line arguments in Windows application?
[Add TO Favorites] [TOP] [PRINT] [CLOCE WINDOWS]  
  Hot Article
·PIC code for triac light dimme
·Connecting a Footswitch to an
·Siemens s7-200 PLC & Visua
·TETRIS source code is availabl
·XML Files and Terramodel
·controlling GPIB from VBA
·LINKING MSC PATRAN WITH INTRAN
·How to interface RS-485 / Modb
·VBA WITH AB PLC
·SIEMENS: I/O, NCDDE AND DCTL
·getch() function
·Visual Basic Serial Comms To S
  Related Articles
·How to get command-line argume
·Creating a Flowsheet GUI
·VB-ITERATION
·PDA programming...
·24CXX Serial EEPROM programmin
·Hardware Interfacing thru C..
·VB6 Running Another Program
·getlogin in C programming
·RowSource problem with Combobo
·Porting a Windows NT C++ app t
·Visual Basic
·Convert Excel to PDF
Power by DedeCms