Ignore:
Timestamp:
Jun 8, 2000, 8:08:58 PM (25 years ago)
Author:
sandervl
Message:

RegQueryValueW, OpenFile and LoadLibrary fixes

File:
1 edited

Legend:

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

    r3588 r3678  
    1 /* $Id: wprocess.cpp,v 1.81 2000-05-22 19:08:01 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.82 2000-06-08 18:08:58 sandervl Exp $ */
    22
    33/*
     
    661661    BOOL            fPath;              /* Flags which is set if the    */
    662662                                        /* lpszLibFile contains a path. */
    663     BOOL            fPE;                /* isPEImage return value. */
     663    ULONG           fPE;                /* isPEImage return value. */
    664664
    665665    /** @sketch
     
    802802     */
    803803    fPE = Win32ImageBase::isPEImage(szModname);
    804     if (fPE)
     804    if(fPE == ERROR_SUCCESS)
    805805    {
    806806        Win32PeLdrDll * peldrDll;
     
    887887    else
    888888    {
    889         dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x) library were found (%s) but it's not loadable!",
    890                  lpszLibFile, hFile, dwFlags, szModname));
    891         SetLastError(ERROR_INVALID_EXE_SIGNATURE);
     889        dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x) library wasn't found (%s) or isn't loadable; err %x",
     890                 lpszLibFile, hFile, dwFlags, szModname, fPE));
     891        SetLastError(fPE);
    892892    }
    893893
     
    13701370        if(winimage == NULL)
    13711371        {
    1372      char modname[CCHMAXPATH];
     1372        char modname[CCHMAXPATH];
    13731373
    13741374        strcpy(modname, lpszModName);
     
    13761376        Win32DllBase::renameDll(modname);
    13771377
    1378         if(Win32ImageBase::isPEImage(modname) == FALSE)
    1379                 {
     1378        if(Win32ImageBase::isPEImage(modname) != ERROR_SUCCESS)
     1379        {
    13801380         HINSTANCE hInstance;
    13811381
     
    14311431        Win32DllBase::renameDll(modname);
    14321432
    1433         if(Win32ImageBase::isPEImage(modname) == FALSE)
    1434                 {
     1433        if(Win32ImageBase::isPEImage(modname) != ERROR_SUCCESS)
     1434        {
    14351435         HINSTANCE hInstance;
    14361436
Note: See TracChangeset for help on using the changeset viewer.