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 From: "Dave Korn" To: Subject: RE: Re[2]: Compiling DLLs to be used from native Win32 application Date: Mon, 21 Jun 2004 17:19:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <1626130083.20040621200059@SECURITY.NNOV.RU> Message-ID: X-OriginalArrivalTime: 21 Jun 2004 16:19:07.0421 (UTC) FILETIME=[7A300CD0:01C457AB] > -----Original Message----- > From: cygwin-owner On Behalf Of 3APA3A > Sent: 21 June 2004 17:01 > >> 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? > > IP> Does help? > > No. I do not want to compile application with > cygwin1.dll. I want to > load library dynamically. But I'll look into crt code anyway. IIRC, it isn't valid to call LoadLibrary on cygwin1.dll; it's not a supported mode of operation. Therefore you also can't LoadLibrary a cygwin-based dll except from a cygwin-native app that has cygwin1.dll loaded all the way along from process startup, because that'll end up implicitly calling LL on the cygwin dll to satisfy the imports for your cygwin-based dll. Got any exciting new vuln reports coming up soon then? Found a security hole or three in cygwin? 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/