提交 80881128 编写于 作者: J Jan Kotas

Move QueryPerformanceCounter PInvokes to shared (dotnet/corefxdotnet/coreclr#36409)

Signed-off-by: Ndotnet-bot <dotnet-bot@microsoft.com>


Commit migrated from https://github.com/dotnet/coreclr/commit/378a0424d350911b569ff3ab0263bb1c1e5fa5ba
上级 c9166cbf
// 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);
}
}
// 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);
}
}
...@@ -1027,6 +1027,8 @@ ...@@ -1027,6 +1027,8 @@
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.MEMORYSTATUSEX.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.MEMORYSTATUSEX.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.MultiByteToWideChar.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.MultiByteToWideChar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.OutputDebugString.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.OutputDebugString.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.QueryPerformanceCounter.cs" Condition="'$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.QueryPerformanceFrequency.cs" Condition="'$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ReadFile_SafeHandle_NativeOverlapped.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ReadFile_SafeHandle_NativeOverlapped.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ResolveLocaleName.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.ResolveLocaleName.cs" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册