Ignore:
Timestamp:
Jun 15, 2001, 11:42:49 AM (24 years ago)
Author:
bird
Message:

Corrected Pe2Lx bug in LoadLibrary. Added isPe2LxDLL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/windllbase.h

    r4523 r6015  
    1 /* $Id: windllbase.h,v 1.7 2000-10-23 13:42:43 sandervl Exp $ */
     1/* $Id: windllbase.h,v 1.8 2001-06-15 09:42:48 bird Exp $ */
    22
    33/*
     
    3030#define LOAD_WITH_ALTERED_SEARCH_PATH   0x00000008
    3131
    32 #define DLL_EXTENSION           ".DLL"
     32#define DLL_EXTENSION       ".DLL"
    3333
    3434//odin.ini section names to lookup renamed dlls
    3535//i.e. OLE32 -> OLE32OS2
    36 #define DLLRENAMEWIN_SECTION    "DLLRENAMEWIN"
     36#define DLLRENAMEWIN_SECTION    "DLLRENAMEWIN"
    3737//i.e. OLE32OS2 -> OLE32
    3838#define DLLRENAMEOS2_SECTION    "DLLRENAMEOS2"
     
    4545
    4646#ifdef DEBUG
    47 virtual ULONG     AddRef(char *parentname = NULL);
     47virtual ULONG     AddRef(char *parentname = NULL);
    4848#else
    4949virtual ULONG     AddRef();
    5050#endif
    51 virtual ULONG     Release();
     51virtual ULONG     Release();
    5252
    53         char     *getName()          { return szModule; };
     53    char     *getName()          { return szModule; };
    5454
    5555        //do not call the ATTACH_THREAD, DETACH_THREAD functions
    56         void      disableThreadLibraryCalls()  { fSkipThreadEntryCalls = TRUE; };
    57         void      disableLibraryCalls()        { fSkipEntryCalls = fSkipThreadEntryCalls = TRUE; };
     56    void      disableThreadLibraryCalls()  { fSkipThreadEntryCalls = TRUE; };
     57    void      disableLibraryCalls()        { fSkipEntryCalls = fSkipThreadEntryCalls = TRUE; };
    5858
    59         Win32DllBase *getNext()  { return next; };
    60 static  Win32DllBase *getFirst();
     59    Win32DllBase *getNext()  { return next; };
     60static  Win32DllBase *getFirst();
    6161
    6262//Send DLL_THREAD_ATTACH message to all dlls for a new thread
     
    7272static  void      tlsDetachThreadFromAllDlls();
    7373
    74         BOOL      attachProcess();
    75         BOOL      detachProcess();
    76         BOOL      attachThread();
    77         BOOL      detachThread();
     74    BOOL      attachProcess();
     75    BOOL      detachProcess();
     76    BOOL      attachThread();
     77    BOOL      detachThread();
    7878
    79         //This counter is incremented when the dll has been loaded with LoadLibrary(Ex)
     79    //This counter is incremented when the dll has been loaded with LoadLibrary(Ex)
    8080        //(== not loaded on behalf of another dll or the main exe)
    81         void      incDynamicLib();
    82         void      decDynamicLib();
    83         BOOL      isDynamicLib()   { return nrDynamicLibRef != 0; };
    84  
    85         void      setUnloadOrder(Win32ImageBase *parent);
     81    void      incDynamicLib();
     82    void      decDynamicLib();
     83    BOOL      isDynamicLib()   { return nrDynamicLibRef != 0; };
    8684
    87         void      updateDependencies();
     85    void      setUnloadOrder(Win32ImageBase *parent);
    8886
    89         BOOL      RemoveCircularDependency(Win32DllBase *parent);
     87    void      updateDependencies();
    9088
    91         //Only called for kernel32
    92         void      DisableUnload()  { fDisableUnload = TRUE; };
     89    BOOL      RemoveCircularDependency(Win32DllBase *parent);
     90
     91    //Only called for kernel32
     92    void      DisableUnload()  { fDisableUnload = TRUE; };
    9393
    9494static  void      deleteDynamicLibs();
    9595static  void      deleteAll();
    9696
    97 static  BOOL      isSystemDll(char *szFileName);
     97static  BOOL      isSystemDll(char *szFileName);
    9898
    99 virtual BOOL      isLxDll() = 0;
     99virtual BOOL      isPe2LxDll() const = 0;
     100virtual BOOL      isLxDll() const = 0;
    100101virtual BOOL      isDll();
    101102
     
    107108static  Win32DllBase *findModule(WIN32DLLENTRY DllEntryPoint);
    108109static  Win32DllBase *findModuleByAddr(ULONG address);
     110static  Win32DllBase *findModuleByOS2Handle(HINSTANCE hinstance);
    109111
    110112#ifdef DEBUG_ENABLELOG_LEVEL2
    111         void          printListOfDlls();
     113    void          printListOfDlls();
    112114#endif
    113115
    114116protected:
    115117#ifdef DEBUG
    116         void          printDependencies(char *parent);
     118    void          printDependencies(char *parent);
    117119#endif
    118120
    119         BOOL          fSkipThreadEntryCalls, fUnloaded, fAttachedToProcess, fSkipEntryCalls;
     121    BOOL          fSkipThreadEntryCalls, fUnloaded, fAttachedToProcess, fSkipEntryCalls;
    120122
    121         WIN32DLLENTRY dllEntryPoint;
     123    WIN32DLLENTRY dllEntryPoint;
    122124
    123         LONG          referenced;
     125    LONG          referenced;
    124126
    125         //This counter is incremented when the dll has been loaded with LoadLibrary(Ex)
     127    //This counter is incremented when the dll has been loaded with LoadLibrary(Ex)
    126128        //(== not loaded on behalf of another dll or the main exe)
    127         BOOL          nrDynamicLibRef;
     129    BOOL          nrDynamicLibRef;
    128130
    129         BOOL          fInserted; //inserted in dll list
     131    BOOL          fInserted; //inserted in dll list
    130132
    131         //This flag is set when a dll has been loaded with DosLoadModule
    132         BOOL          fDisableUnload;
     133    //This flag is set when a dll has been loaded with DosLoadModule
     134    BOOL          fDisableUnload;
    133135
    134136static  Win32DllBase *head;
    135         Win32DllBase *next;
     137    Win32DllBase *next;
    136138private:
    137139static  Queue         loadLibDlls;
Note: See TracChangeset for help on using the changeset viewer.