This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Re[2]: Compiling DLLs to be used from native Win32 application
- From: "Dave Korn" <dk at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 21 Jun 2004 17:19:07 +0100
- Subject: RE: Re[2]: Compiling DLLs to be used from native Win32 application
> -----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 <http://cygwin.com/ml/cygwin/2004-06/msg00274.html> 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/