Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-Id: <199910291722.MAA18548@pluto.xraylith.wisc.edu>
To: Danny Sinclair <uf657@victoria.tc.ca>
cc: cygwin@sourceware.cygnus.com
Subject: Re: mingw32 DLL getting main args? 
In-Reply-To: Your message of "Tue, 26 Oct 1999 03:34:36 PDT."
             <Pine.GSO.3.95.iB1.0.991026033214.1821A-100000@vtn1> 
Date: Fri, 29 Oct 1999 12:22:50 -0500
From: Mumit Khan <khan@thor.xraylith.wisc.edu>

Danny Sinclair <uf657@victoria.tc.ca> writes:
> Why does a DLL, made with Mumit's mingw32 2.95 release, need to call
> msvcrt.dll's __getmainargs?
> 
> When the DLLMainCRTStartup function receives DLL_PROCESS_ATTACH it calls
> _mingw32_init_mainargs, which then calls __getmainargs. I don't want my
> DLL to be dynamicly linked to msvcrt.dll, but it is because of this. Why
> does a DLL need to parse the command line?
> 

Good point. I don't know why it's done that way (it was there when I first
used it). MSVC does not seem to do this, but DLLs created with MSVC are
linked dynamically to MSVCRT.DLL (if you have /MD). I'll do some checking,
and remove the getmainargs if it's not needed.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

