Ignore:
Timestamp:
May 20, 2002, 4:22:37 PM (23 years ago)
Author:
sandervl
Message:

Make sure LX dlls can never be unloaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/windlllx.cpp

    r7075 r8459  
    1 /* $Id: windlllx.cpp,v 1.23 2001-10-16 11:39:38 sandervl Exp $ */
     1/* $Id: windlllx.cpp,v 1.24 2002-05-20 14:22:37 sandervl Exp $ */
    22
    33/*
     
    195195                                     Subsystem);
    196196  dprintf(("Fake PE header %x for dll %s", hinstance, getModuleName()));
     197
     198  //HACK ALERT!!
     199  //This makes sure the LX dll never gets unloaded.
     200  //Necessary since unloading doesn't work due to dependencies on dlls
     201  //with exitlist handlers.
     202  referenced++;
    197203}
    198204//******************************************************************************
     
    266272  if(ret == 0 && !fNoUnload) {//only set for kernel32.dll (fDisableUnload)
    267273    //DosFreeModule sends a termination message to the dll.
    268         //The LX dll informs us when it's removed (UnregisterDll call)
     274    //The LX dll informs us when it's removed (UnregisterDll call)
    269275    rc = DosFreeModule(hinst);
    270276    if(rc) {
    271277            dprintf(("Win32LxDll::Release: DosFreeModule %x returned %d", hinst, rc));
    272             if(rc == ERROR_INVALID_ACCESS && !fExitProcess) {
     278            if(rc == ERROR_INVALID_ACCESS && !fExitProcess)
     279            {
    273280                //Dll refused to unload because it has an active exitlist handler
    274281                //or depends on a dll that registered an exitlist handler
Note: See TracChangeset for help on using the changeset viewer.