/// <summary> /// Gets the current 'Ticks' on the performance counter /// </summary> /// <returns>Long indicating the number of ticks on the performance counter</returns> public static long QueryPerformanceCounter() { long perfcount; MyWindowsAPIWrapper.QueryPerformanceCounter(out perfcount); return(perfcount); }
/// <summary> /// Gets the number of performance counter ticks that occur every second /// </summary> /// <returns>The number of performance counter ticks that occur every second</returns> public static long QueryPerformanceFrequency() { long freq; MyWindowsAPIWrapper.QueryPerformanceFrequency(out freq); return(freq); }
public void Dispose() { if (IsDisposed) { return; } MyWindowsAPIWrapper.UnloadKeyboardLayout(Handle); IsDisposed = true; }
public bool PreFilterMessage(ref Message m) { if (BypassedMessages.Contains(m.Msg)) { if (m.Msg == (int)WM.ACTIVATE) { if (m.WParam == IntPtr.Zero) { OnDeactivate(EventArgs.Empty); } else { OnActivated(EventArgs.Empty); } } m.Result = MyWindowsAPIWrapper.DefWindowProc(m.HWnd, m.Msg, m.WParam, m.LParam); return(true); } return(false); }
public KeyboardLayout(string keyboardLayoutID) : this(MyWindowsAPIWrapper.LoadKeyboardLayout(keyboardLayoutID, KLF_NOTELLSHELL)) { }