Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 21 Jun 2004 11:34:33 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: 3APA3A <3APA3A AT SECURITY DOT NNOV DOT RU> cc: cygwin AT cygwin DOT com Subject: Re: Compiling DLLs to be used from native Win32 application In-Reply-To: <419004530.20040621185653@SECURITY.NNOV.RU> Message-ID: References: <419004530 DOT 20040621185653 AT SECURITY DOT NNOV DOT RU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 Note-from-DJ: This may be spam On Mon, 21 Jun 2004, 3APA3A wrote: > Dear cygwincygwincom, Umm, is that the wisest choice of address? Let's not feed the spam harvesters. > I saw this problem was raised for few times on list, but do not see > final solution. I want to create native Windows frontend to > cygwin-based dynamic library. > > What I did: > > 1. I did DLL, it works fine with cygwin application. > 2. If I try to use it from native application it hangs on LoadLibrary. > 3. I did DllMain function with impure_ptr initialization and finally > compiled as described in FAQ. > 4. Now DLL loads and simple functions (for example strcpy()/ctrcat() > based) work OK, but any "syscall" from DLL to cygwin function (for > example printf()) causes NULL pointer reference. > > Is subj possible? May be some additional initialization is required? Does help? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/