diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-10 16:07:45 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-10 17:05:57 -0800 |
commit | 751771a8976f909af772e35c167bd7e3ffbe44c8 (patch) | |
tree | bc9ed8f9312625626e3547c3c3ca1201a37bb81f /src/vm/dllimport.cpp | |
parent | e5f2df239b546ac9ed2417506c90af222eaf1013 (diff) | |
download | coreclr-751771a8976f909af772e35c167bd7e3ffbe44c8.tar.gz coreclr-751771a8976f909af772e35c167bd7e3ffbe44c8.tar.bz2 coreclr-751771a8976f909af772e35c167bd7e3ffbe44c8.zip |
Remove always defined FEATURE_CORESYSTEM
Diffstat (limited to 'src/vm/dllimport.cpp')
-rw-r--r-- | src/vm/dllimport.cpp | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/src/vm/dllimport.cpp b/src/vm/dllimport.cpp index b7989e92bc..d2d8c96694 100644 --- a/src/vm/dllimport.cpp +++ b/src/vm/dllimport.cpp @@ -6606,9 +6606,6 @@ static HMODULE LocalLoadLibraryHelper( LPCWSTR name, DWORD flags, LoadLibErrorTr #ifndef FEATURE_PAL if ((flags & 0xFFFFFF00) != 0 -#ifndef FEATURE_CORESYSTEM - && NDirect::SecureLoadLibrarySupported() -#endif // !FEATURE_CORESYSTEM ) { hmod = CLRLoadLibraryEx(name, NULL, flags & 0xFFFFFF00); @@ -6661,62 +6658,6 @@ static HMODULE LocalLoadLibraryDirectHelper(LPCWSTR name, DWORD flags, LoadLibEr } -#if !defined(FEATURE_CORESYSTEM) - -#define NATIVE_DLL(d) L#d, L#d W(".dll") - -const LPCWSTR wellKnownModules[] = -{ - NATIVE_DLL(advapi32), - NATIVE_DLL(gdi32), - NATIVE_DLL(gdiplus), - NATIVE_DLL(kernel32), - NATIVE_DLL(mscoree), - NATIVE_DLL(ole32), - NATIVE_DLL(shfolder), - NATIVE_DLL(user32), - NATIVE_DLL(version) -}; - -BOOL CompareLibNames (UPTR val1, UPTR val2) -{ - CONTRACTL { - MODE_ANY; - NOTHROW; - GC_NOTRIGGER; - } - CONTRACTL_END; - - LPCWSTR wszStr1 = (LPCWSTR)(val1 << 1); - LPCWSTR wszStr2 = (LPCWSTR)val2; - - if (SString::_wcsicmp(wszStr1, wszStr2) == 0) - return TRUE; - - return FALSE; -} - -PtrHashMap * NDirect::s_pWellKnownNativeModules = NULL; -bool NDirect::s_fSecureLoadLibrarySupported = false; - -HINSTANCE NDirect::CheckForWellKnownModules(LPCWSTR wszLibName, LoadLibErrorTracker *pErrorTracker) -{ - STANDARD_VM_CONTRACT; - - ModuleHandleHolder hMod; - ULONG hash = HashiString(wszLibName); - LPCWSTR wszName = NULL; - wszName = (LPCWSTR) s_pWellKnownNativeModules->LookupValue((UPTR) hash, (LPVOID)wszLibName); - - if (wszName != (LPCWSTR)INVALIDENTRY) - { - hMod = LocalLoadLibraryHelper(wszLibName, 0, pErrorTracker); - } - - return hMod.Extract(); -} - -#endif // !FEATURE_CORESYSTEM #define TOLOWER(a) (((a) >= W('A') && (a) <= W('Z')) ? (W('a') + (a - W('A'))) : (a)) #define TOHEX(a) ((a)>=10 ? W('a')+(a)-10 : W('0')+(a)) @@ -7006,9 +6947,6 @@ HINSTANCE NDirect::LoadLibraryModule(NDirectMethodDesc * pMD, LoadLibErrorTracke return hmod.Extract(); } -#if !defined(FEATURE_CORESYSTEM) - hmod = CheckForWellKnownModules(wszLibName, pErrorTracker); -#endif #ifdef FEATURE_PAL // In the PAL version of CoreCLR, the CLR module itself exports the functionality @@ -7020,7 +6958,7 @@ HINSTANCE NDirect::LoadLibraryModule(NDirectMethodDesc * pMD, LoadLibErrorTracke hmod = GetCLRModule(); #endif // FEATURE_PAL -#if defined(FEATURE_CORESYSTEM) && !defined(PLATFORM_UNIX) +#if !defined(PLATFORM_UNIX) if (hmod == NULL) { // Try to go straight to System32 for Windows API sets. This is replicating quick check from |