Ignore:
Timestamp:
Aug 27, 1999, 6:51:01 PM (26 years ago)
Author:
sandervl
Message:

Implemented multiple views of memory mapped files + some bugfixes to PE loader code

File:
1 edited

Legend:

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

    r705 r712  
    1 /* $Id: winimage.cpp,v 1.17 1999-08-26 12:55:37 sandervl Exp $ */
     1/* $Id: winimage.cpp,v 1.18 1999-08-27 16:51:01 sandervl Exp $ */
    22
    33/*
     
    200200 IMAGE_TLS_DIRECTORY *tlsDir = NULL;
    201201 int    nSections, i;
     202 char   szFullPath[CCHMAXPATH] = "";
    202203
    203204  fImgMapping = VIRTUAL_MapFileA(szFileName, &win32file);
     
    207208        WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);
    208209        goto failure;
     210  }
     211
     212  if(DosQueryPathInfo(szFileName, FIL_QUERYFULLNAME, szFullPath, sizeof(szFullPath)) == 0) {
     213        setFullPath(szFullPath);
    209214  }
    210215
     
    425430        }
    426431  }
    427 
    428   if(processImports((char *)win32file) == FALSE) {
    429         fout << "Failed to process imports!" << endl;
    430         goto failure;
    431   }
    432 
    433432  if(fh.Characteristics & IMAGE_FILE_DLL) {
    434433        if(processExports((char *)win32file) == FALSE) {
     
    437436        }
    438437  }
     438
     439  if(processImports((char *)win32file) == FALSE) {
     440        fout << "Failed to process imports!" << endl;
     441        goto failure;
     442  }
     443
    439444  IMAGE_SECTION_HEADER sh;
    440445  if(GetSectionHdrByName (win32file, &sh, ".rsrc")) {
     
    797802  apiaddr = WinDll->getApi(ordinal);
    798803  if(apiaddr == 0) {
    799     fout << "--->>> NOT FOUND!";
    800     *import = (ULONG)MissingApi;
     804        fout << "--->>> NOT FOUND!";
     805        *import = (ULONG)MissingApi;
    801806  }
    802807  else  *import = apiaddr;
     
    812817  apiaddr = WinDll->getApi(impname);
    813818  if(apiaddr == 0) {
    814     fout << "--->>> NOT FOUND!";
    815     *import = (ULONG)MissingApi;
     819        fout << "--->>> NOT FOUND!";
     820        *import = (ULONG)MissingApi;
    816821  }
    817822  else  *import = apiaddr;
Note: See TracChangeset for help on using the changeset viewer.