Re: crfaker fix
Greg Humphreys <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
If I recall correctly, this is (was?) explicitly documented in MSDN as being illegal (manual loading of other DLL's within DLLMain). It USED to be there, and then I discovered this, and moved it. -- Greg Humphreys, Assistant Professor Department of Computer Science, University of Virginia http://www.cs.virginia.edu/~humper/ On Jun 23, 2004, at 11:37 AM, Ricky Uy wrote: > Hi, > > For the Windows version of this library, there should be a call to > stubInit() just before the return in DLLMain() in load.c, and all the > calls to stubInit() should be removed from the wgl functions in wgl.c. > There were several applications that would bail out because of this, > including Celestia for Windows. However with this patch, they all > work. > > The problem was that some applications don't call wgl functions before > trying to do other things. For example, especially in direct response > to Alicia's post, Celestia would try to call ShowWindow() before > calling ChoosePixelFormat(). This caused a crash because ShowWindow > makes a call to glViewport, and because stubInit() had not yet been > called, the glim dispatch table was nulled out. So there was a crash. > By having stubInit() in DLLMain, issues like these are resolved. > > Now there was a comment above DLLMain saying that Windows didn't allow > the loading of other libraries in DLLMain, and I'm not sure what has > happened since, but it works fine. Hope this helps some people with > their applications. > > Ricky > > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com