summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-05-21 07:48:53 -0700
committerGitHub <noreply@github.com>2019-05-21 07:48:53 -0700
commit221dc73878027e95b515d0c46cad0266331e538d (patch)
tree7c6561aaea354019a00573a2337085293699f93b /src/pal
parent458d030119725292bcc00b07dd401dc01d3ce119 (diff)
downloadcoreclr-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')
-rw-r--r--src/pal/inc/pal.h7
-rw-r--r--src/pal/src/loader/module.cpp54
2 files changed, 0 insertions, 61 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index 540b5c6dcd..bcb4e8ce8f 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -2655,13 +2655,6 @@ PAL_LoadLibraryDirect(
IN LPCWSTR lpLibFileName);
PALIMPORT
-HMODULE
-PALAPI
-PAL_RegisterLibraryDirect(
- IN NATIVE_LIBRARY_HANDLE dl_handle,
- IN LPCWSTR lpLibFileName);
-
-PALIMPORT
BOOL
PALAPI
PAL_FreeLibraryDirect(
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