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/vm/method.cpp | |
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/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 31c49748bc..cdbd4430ab 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -5110,7 +5110,7 @@ void NDirectMethodDesc::InterlockedSetNDirectFlags(WORD wFlags) } #ifndef CROSSGEN_COMPILE -FARPROC NDirectMethodDesc::FindEntryPointWithMangling(HINSTANCE hMod, PTR_CUTF8 entryPointName) const +FARPROC NDirectMethodDesc::FindEntryPointWithMangling(NATIVE_LIBRARY_HANDLE hMod, PTR_CUTF8 entryPointName) const { CONTRACTL { @@ -5120,7 +5120,11 @@ FARPROC NDirectMethodDesc::FindEntryPointWithMangling(HINSTANCE hMod, PTR_CUTF8 } CONTRACTL_END; +#ifndef FEATURE_PAL FARPROC pFunc = GetProcAddress(hMod, entryPointName); +#else + FARPROC pFunc = PAL_GetProcAddressDirect(hMod, entryPointName); +#endif #if defined(_TARGET_X86_) @@ -5163,7 +5167,7 @@ FARPROC NDirectMethodDesc::FindEntryPointWithMangling(HINSTANCE hMod, PTR_CUTF8 } //******************************************************************************* -LPVOID NDirectMethodDesc::FindEntryPoint(HINSTANCE hMod) const +LPVOID NDirectMethodDesc::FindEntryPoint(NATIVE_LIBRARY_HANDLE hMod) const { CONTRACTL { |