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: non-persistent DllMain


Sam Liddicott wrote on 03 October 2008 14:04:

> * Dave Korn wrote, On 03/10/08 13:34:
>>   DllMain is special.  There's a lot you cannot do in there, in
>> particular file i/o, printf etc, because you're running inside a lock
>> and it's a sort of critical section-y sort of situation, and indeed the
>> MSVC CRT probably isn't inited yet, so you definitely won't have stdio.
>> 
>>   If I were you, I'd put loads of OutputDebugMessage calls in your
>> DllMain, and watch what's happening and look at the value of hModule,
>> and the addressof g_hDLL (etc) using Sysinternals DebugView.
>> 
> OutputDebugString doesn't work in DllMain either, but it works in the
> other functions.

 [also in light of your subsequent post:]

  Are you /completely/ sure DllMain is being called, and that you're actually
invoking the particular build of the DLL that you think you are, rather than
maybe one in your PATH or elsewhere that's somehow getting first in the DLL
search order?


    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/


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