🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #7768

Re: 2 questions: _argv and radio buttons

#7768
From: Bill Ferro
Date: Thu, 27 Dec 1990 22:47
27 lines
1408 bytes
ssvvss@mixcom.UUCP (Synetics Software) writes:

>M.S. documentation says I can access the command line arguments by
>declaring "extern char *_argv[]" (actually it's __argv with 2 underscores,
>_argv with 1 underscore is not defined).  When I do this, I get garbage
>when I access the array, although __argc seems to be set correctly.
>Is there a trick to getting this to work?  I'd prefer to access argv
>rather than parsing lpCmdLine which gets passed to WinMain.

I found that Windows "extern char *__argv[]" is actually a pointer to
the real argv.  In my case, in WinMain, I call a MAIN procedure.  The
code goes something like this:
	extern	char	*__argv[];
	extern	char	__argc;

	...
	main(__argc,(char **)*__argv);
	...
Hope this helps....

-bf

--
Bill Ferro			UUCP: mit-eddie!progress!billf
Progress Software Corp.		Internet: billf@progress.com
5 Oak Park
Bedford, MA  01730
Technical Details
Message-ID: <1990Dec27.224724.8404@progress.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!progress!billf
References: <136@mixcom.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!progress!billf
From: billf@progress.COM (Bill Ferro)
Newsgroups: comp.windows.ms
Subject: Re: 2 questions: _argv and radio buttons
Message-ID: <1990Dec27.224724.8404@progress.com>
Date: 27 Dec 90 22:47:24 GMT
References: <136@mixcom.UUCP>
Sender: news@progress.com (The News User)
Organization: Progress Software Corp., Bedford, MA
Lines: 27
Nntp-Posting-Host: billf