Ignore:
Timestamp:
Aug 17, 2000, 8:22:18 PM (25 years ago)
Author:
sandervl
Message:

GetModuleHandle fix + minor changes

File:
1 edited

Legend:

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

    r3995 r4029  
    1 /* $Id: wprocess.cpp,v 1.87 2000-08-11 18:42:55 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.88 2000-08-17 18:22:18 sandervl Exp $ */
    22
    33/*
     
    756756    }
    757757
     758    //test if dll is in PE or LX format
     759    fPE = Win32ImageBase::isPEImage(szModname);
    758760
    759761    /** @sketch
    760      *  IF dwFlags == 0 THEN
     762     *  IF dwFlags == 0 && (!fPeLoader || !fPE) THEN
    761763     *      Try load the executable using LoadLibrary
    762764     *      IF successfully loaded THEN
     
    770772     *  Endif
    771773     */
    772     if (dwFlags == 0)
     774    //only call Open32 if dwFlags == 0 and (LX binary or win32k process)
     775    if(dwFlags == 0 && (!fPeLoader || fPE != ERROR_SUCCESS))
    773776    {
    774777        hDll = O32_LoadLibrary(szModname);
     
    816819     *  return hDll.
    817820     */
    818     fPE = Win32ImageBase::isPEImage(szModname);
    819821    if(fPE == ERROR_SUCCESS)
    820822    {
     
    11381140HANDLE WIN32API GetModuleHandleA(LPCTSTR lpszModule)
    11391141{
    1140  HANDLE    hMod;
     1142 HANDLE    hMod = 0;
    11411143 Win32DllBase *windll;
    11421144 char      szModule[CCHMAXPATH];
Note: See TracChangeset for help on using the changeset viewer.