This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Loading a cygwin generated dll from a non-cygwin app


jon@bigbang.com.au (Jon Wells) writes:
> G'day,
>   I've been messing with this all day and to get it to work I had to
> set the dll's entry point to __cygwin_noncygwin_dll_entry.
> 
> Does that make sense? 

That's why it's called that ... it was a hack we had to add to
b20.1 to allow loading of Cygwin DLLs from non-cygwin apps work
(eg., Java JNI's, Excel DLLs, Netscape plugins, etc). 

There has been some discussions about this in the mailing list.

> Doesn't this mean that a dll can't be loaded by both cygwin and
> non-cygwin apps.. or is there more magic in there???

The only other choice, and it was the case with my first patch 
to handle this, breaks binary compatibility and that's obviously
a no-no between b20 and b20.1.

This is fixed in b21, where the same entry point should suffice.
I haven't tested the snapshots, but the code looks ok.

> If this is what's s'pose to happen then maybe it'd be worth a mention
> in the FAQ or Mumit's dllhelpers or someplace... or any place other
> than ``gee I wonder what happens if I call that one instead.''

Hmmm ... I thought I had this peperred in my various examples, but
unfortunately those are the examples in Java-jni and excel. Thanks
for mentioning this; I'll add this to dllhelpers as well.

Regards,
Mumit


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