This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: Compiling DLLs to be used from native Win32 application


On Mon, 21 Jun 2004, 3APA3A wrote:

> Dear Igor Pechtchanski,
>
> --Monday, June 21, 2004, 7:34:33 PM, you wrote to 3APA3A<at>SECURITY<dot>NNOV<dot>RU:

<http://cygwin.com/acronyms/#PCYMTNQREAIYR> (even if it's your own). :-D

> >>  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?
>
> 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.

Whoops, sorry for the confusion.  I didn't realise that the information
from the above message is already in the FAQ (and that's probably what you
referred to in your step 3 above).

It would probably be best to make changes to the Cygwin1.dll to allow
dynamic loading via LoadLibrary, rather than trying to force the
initialization from an external DLL.  If you manage to get this working,
please consider submitting a patch to Cygwin with your changes (see
<http://cygwin.com/contrib.html>).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]