QueryPerformanceCounter
C# Signature:
[DllImport("kernel32.dll", SetLastError=true)]
static extern bool QueryPerformanceCounter(out long lpPerformanceCount);VB.NET Signature:
<DllImport("kernel32.dll", SetLastError:=True)> _
Shared Function QueryPerformanceCounter(ByRef lpPerformanceCount As Long) As Boolean
End FunctionManage C++ Signature:
[DllImport("Kernel32.dll", SetLastError=true)]
extern bool QueryPerformanceCounter(long *lpPerformanceCount);Tips & Tricks:
[DllImport("kernel32.dll"),SuppressUnmanagedCodeSecurity]
static extern bool QueryPerformanceCounter(out long lpPerformanceCount);VB.NET Sample Code:
Imports System.Runtime.InteropServices
Imports System.Security
Friend Enum TimeState
Started
Stopped
End Enum
Public Class HighResTimer
<DllImport("kernel32.dll"), SuppressUnmanagedCodeSecurity()> _
Private Shared Function QueryPerformanceCounter(ByRef lpPerformanceCount As Long) As Boolean
End FunctionVB.NET Sample Code:
VB.NET Sample Code:
C# Sample Code:
Última actualización