Mon Jan 10 20:10:38 2011: Request 64575 was acted upon.
Transaction: Correspondence added by j...@activestate.com
       Queue: Win32-Daemon
     Subject: RE: [rt.cpan.org #64575] Start callback not called with 
Strawberry Perl 5.10 / 5.12
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: ha...@strotbek.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64575 >


On Fri, 07 Jan 2011, Haiko Strotbek via RT wrote:
> > I don't understand how that could make a difference. I find only 2
> > references to gMainThreadId in the sources:
> >
> > In the DllMain() function (in Daemon.xs line 952) the variable is 
> > initialized:
> >
> >                     gMainThreadId = GetCurrentThreadId();
> >
> > This code is executed when the DLL is loaded into the process, before
> > any other code in the same DLL can run.  Since GetCurrentThreadId()
> > cannot fail, and thread ids are never 0, I can't see how gMainThreadId
> > can ever be 0 at a later point in time.
[...] 
> According to my debug messages the DllMain() function isn't called, so
> the gMainThreadId remains 0.

I find that hard to believe.  Did you sprinkle some OutputDebugString()
calls into the function and then watch either with the Sysinternals
Debug viewer, or Visual Studio etc. to see where the control flow
goes through.  If DllMain() isn't called, then all the other initializations
in the DLL_PROCESS_ATTACH entry in the switch statement won't happen
either.

Cheers,
-Jan


Reply via email to