Parameters:
IN hFile - The file to load
+ IN wszPath - File path
+ OUT isPreloaded - Flag whether pefile was preloaded
Return value:
A valid base address if successful.
PALIMPORT
PVOID
PALAPI
-PAL_LOADLoadPEFile(HANDLE hFile);
+PAL_LOADLoadPEFile(HANDLE hFile, LPCWSTR wszPath, BOOL *isPreloaded);
/*++
PAL_LOADUnloadPEFile
PALAPI
PAL_LOADUnloadPEFile(PVOID ptr);
+/*++
+Function:
+ PAL_LOADPreloadPEFile
+
+Abstract
+ Preloads a PE file into memory. Properly maps all of the sections in the PE file. Returns a pointer to the
+ loaded base.
+
+Parameters:
+ IN szPath - path of file to load
+
+Return value:
+ A valid base address if successful.
+ 0 if failure
+--*/
+void *
+PAL_LOADPreloadPEFile(LPCSTR szPath);
+
+/*++
+ PAL_LOADUnloadPreloadedPEFiles
+
+ Unload all PE files that were loaded by PAL_LOADPreloadPEFile().
+
+Return value:
+ TRUE - success
+ FALSE - failure
+--*/
+BOOL
+PAL_LOADUnloadPreloadedPEFiles();
+
#ifdef UNICODE
#define LoadLibrary LoadLibraryW
#define LoadLibraryEx LoadLibraryExW