Move QueryPerformanceCounter PInvokes to shared (dotnet/corefx#36409)
authorJan Kotas <jkotas@microsoft.com>
Thu, 28 Mar 2019 05:37:22 +0000 (22:37 -0700)
committerStephen Toub <stoub@microsoft.com>
Thu, 28 Mar 2019 05:37:22 +0000 (01:37 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/560dbe850a77d51437039495b87b1819d1f7a5b2

src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs [deleted file]
src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs [deleted file]
src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj

diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs
deleted file mode 100644 (file)
index ddc9797..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
-    internal partial class Kernel32
-    {
-        // The actual native signature is:
-        //      BOOL WINAPI QueryPerformanceCounter(
-        //          _Out_ LARGE_INTEGER* lpPerformanceCount
-        //      );
-        //
-        // We take a long* (rather than a out long) to avoid the pinning overhead.
-        // We don't set last error since we don't need the extended error info.
-
-        [DllImport(Libraries.Kernel32, ExactSpelling = true)]
-        internal static extern unsafe BOOL QueryPerformanceCounter(long* lpPerformanceCount);
-    }
-}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs
deleted file mode 100644 (file)
index 72a48ba..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
-    internal partial class Kernel32
-    {
-        // The actual native signature is:
-        //      BOOL WINAPI QueryPerformanceFrequency(
-        //          _Out_ LARGE_INTEGER* lpFrequency
-        //      );
-        //
-        // We take a long* (rather than a out long) to avoid the pinning overhead.
-        // We don't set last error since we don't need the extended error info.
-
-        [DllImport(Libraries.Kernel32, ExactSpelling = true)]
-        internal static extern unsafe BOOL QueryPerformanceFrequency(long* lpFrequency);
-    }
-}
index 8c88a7e9162a4c4658c96122466f654973522040..bd1cc5ef33e59e320fd43f55ddd849030c46454d 100644 (file)
     <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.GetSystemDirectoryW.cs">
       <Link>Common\Interop\Windows\Kernel32\Interop.GetSystemDirectoryW.cs</Link>
     </Compile>
-    <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.QueryPerformanceCounter.cs">
+    <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.QueryPerformanceCounter.cs">
       <Link>Common\Interop\Windows\Kernel32\Interop.QueryPerformanceCounter.cs</Link>
     </Compile>
-    <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.QueryPerformanceFrequency.cs">
+    <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.QueryPerformanceFrequency.cs">
       <Link>Common\Interop\Windows\Kernel32\Interop.QueryPerformanceFrequency.cs</Link>
     </Compile>
     <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.SetCurrentDirectory.cs">