diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-05-21 07:48:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 07:48:53 -0700 |
commit | 221dc73878027e95b515d0c46cad0266331e538d (patch) | |
tree | 7c6561aaea354019a00573a2337085293699f93b /src/pal/src | |
parent | 458d030119725292bcc00b07dd401dc01d3ce119 (diff) | |
download | coreclr-221dc73878027e95b515d0c46cad0266331e538d.tar.gz coreclr-221dc73878027e95b515d0c46cad0266331e538d.tar.bz2 coreclr-221dc73878027e95b515d0c46cad0266331e538d.zip |
Avoid PAL LoadLibrary simulator for regular PInvoke (#24669)
Fixes #21009
Diffstat (limited to 'src/pal/src')
-rw-r--r-- | src/pal/src/loader/module.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/pal/src/loader/module.cpp b/src/pal/src/loader/module.cpp index e50ed56bee..dc4c8babf0 100644 --- a/src/pal/src/loader/module.cpp +++ b/src/pal/src/loader/module.cpp @@ -637,60 +637,6 @@ done: /* Function: - PAL_RegisterLibraryDirect - - Registers a system handle to a loaded library with the module list. - - Returns a PAL handle to the loaded library, or nullptr upon failure (error is set via SetLastError()). -*/ -HMODULE -PALAPI -PAL_RegisterLibraryDirect( - IN NATIVE_LIBRARY_HANDLE dl_handle, - IN LPCWSTR lpLibFileName) -{ - PathCharString pathstr; - CHAR * lpstr = nullptr; - INT name_length; - HMODULE hModule = nullptr; - - PERF_ENTRY(RegisterLibraryDirect); - ENTRY("RegisterLibraryDirect (lpLibFileName=%p (%S)) \n", - lpLibFileName ? lpLibFileName : W16_NULLSTRING, - lpLibFileName ? lpLibFileName : W16_NULLSTRING); - - if (!LOADVerifyLibraryPath(lpLibFileName)) - { - goto done; - } - - lpstr = pathstr.OpenStringBuffer((PAL_wcslen(lpLibFileName)+1) * MaxWCharToAcpLength); - if (nullptr == lpstr) - { - goto done; - } - if (!LOADConvertLibraryPathWideStringToMultibyteString(lpLibFileName, lpstr, &name_length)) - { - goto done; - } - - /* do the Dos/Unix conversion on our own copy of the name */ - FILEDosToUnixPathA(lpstr); - pathstr.CloseBuffer(name_length); - - /* let LOADRegisterLibraryDirect call SetLastError in case of failure */ - LockModuleList(); - hModule = LOADRegisterLibraryDirect(dl_handle, lpstr, true /* fDynamic */); - UnlockModuleList(); - -done: - LOGEXIT("RegisterLibraryDirect returns HMODULE %p\n", hModule); - PERF_EXIT(RegisterLibraryDirect); - return hModule; -} - -/* -Function: PAL_FreeLibraryDirect Free a loaded library |