X-Spam-Check-By: sourceware.org
Message-ID: <6bd5d4070611011411h6e6161d5w874871663a2140b@mail.gmail.com>
Date: Wed, 1 Nov 2006 16:11:54 -0600
From: "Sammy Yu" <temijun@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Possible to use pinvoke to call DLL built with cygwin
In-Reply-To: <01b501c6fdef$f199aff0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <4548FF03.50403@cygwin.com> 	 <01b501c6fdef$f199aff0$a501a8c0@CAM.ARTIMI.COM>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hey guys,
   Thanks for the quick response.  I've tried calling the
cygwin_dll_init method but I'm still getting the same error.  I think
it's because of the 4K scratch space on stack size limitation
mentioned here:
http://sourceware.redhat.com/cygwin/faq/faq-nochunks.html.   Is this
correct?  Being relative new to C#, I am not aware of anyway of
changing the stack size.  This is probably wrong news group to ask,
but has anybody ported over the winsup.api code into a C# version?

Best regards,
Sammy


On 11/1/06, Dave Korn <dave.korn@artimi.com> wrote:
> On 01 November 2006 20:10, Larry Hall (Cygwin) wrote:
>
> > Sammy Yu wrote:
>
> >>   One of the
> >> components built is a DLL which I want to invoke from a C Sharp
> >> application.  However, the application crashes whenever I call this DLL
> >> via pinvoke in C Sharp.
>
> > You need to initialize the DLL.  Loading the Cygwin DLL from a non-Cygwin
> > app doesn't initialize it automatically.  Only Cygwin apps do that.  Off
> > the top of my head, I don't recall the details but this has been discussed
> > before in the email archives, if you want to poke around a bit for the
> > procedure.
>
>   Googling "cygload" should get the details.
>
>
>     cheers,
>       DaveK
> --
> Can't think of a witty .sigline today....
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

