From adf89f8ad08eaf477b768d76d3902d123fd916e2 Mon Sep 17 00:00:00 2001 From: Konstantin Baladurin Date: Fri, 5 Jul 2019 19:36:28 +0300 Subject: [Tizen] Add coreclr_preload_assembly to CoreCLR host API --- src/pal/inc/pal.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/pal/inc/pal.h') diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index abb25e889f..11b434dcd2 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -2696,6 +2696,8 @@ Abstract 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. @@ -2704,7 +2706,7 @@ Return value: PALIMPORT PVOID PALAPI -PAL_LOADLoadPEFile(HANDLE hFile); +PAL_LOADLoadPEFile(HANDLE hFile, LPCWSTR wszPath, BOOL *isPreloaded); /*++ PAL_LOADUnloadPEFile @@ -2723,6 +2725,36 @@ BOOL 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 -- cgit v1.2.3