From e1327455b596ffb787008b347cca6463238d3e7a Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Mon, 6 Jun 2016 20:15:46 -0700 Subject: [PATCH] Use Ntdll!RtlZeroMemory instead of kernel32!RtlZeroMemory to support Nano Server Commit migrated from https://github.com/dotnet/coreclr/commit/2a1187d9344639cc343d1e227ee03c6d1eb1e9ca --- src/coreclr/src/mscorlib/src/Microsoft/Win32/Win32Native.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/mscorlib/src/Microsoft/Win32/Win32Native.cs b/src/coreclr/src/mscorlib/src/Microsoft/Win32/Win32Native.cs index ba6030e..ebe53f4 100644 --- a/src/coreclr/src/mscorlib/src/Microsoft/Win32/Win32Native.cs +++ b/src/coreclr/src/mscorlib/src/Microsoft/Win32/Win32Native.cs @@ -700,18 +700,19 @@ namespace Microsoft.Win32 { internal const String USER32 = "user32.dll"; internal const String OLE32 = "ole32.dll"; internal const String OLEAUT32 = "oleaut32.dll"; + internal const String NTDLL = "ntdll.dll"; #else //FEATURE_PAL internal const String KERNEL32 = "libcoreclr"; internal const String USER32 = "libcoreclr"; internal const String OLE32 = "libcoreclr"; internal const String OLEAUT32 = "libcoreclr"; + internal const String NTDLL = "libcoreclr"; #endif //FEATURE_PAL internal const String ADVAPI32 = "advapi32.dll"; internal const String SHELL32 = "shell32.dll"; internal const String SHIM = "mscoree.dll"; internal const String CRYPT32 = "crypt32.dll"; internal const String SECUR32 = "secur32.dll"; - internal const String NTDLL = "ntdll.dll"; #if FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME internal const String MSCORWKS = "coreclr.dll"; #else //FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME @@ -760,7 +761,7 @@ namespace Microsoft.Win32 { internal static extern IntPtr LocalFree(IntPtr handle); // MSDN says the length is a SIZE_T. - [DllImport(KERNEL32, EntryPoint = "RtlZeroMemory")] + [DllImport(NTDLL, EntryPoint = "RtlZeroMemory")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] internal static extern void ZeroMemory(IntPtr address, UIntPtr length); -- 2.7.4