private void FreeQueue() { if (hRedirectSignalEvent != IntPtr.Zero) { // Stop redirecting Wedge data to our queue WIN32.ResetEvent(hRedirectSignalEvent); WIN32.CloseHandle(hRedirectSignalEvent); } hRedirectSignalEvent = IntPtr.Zero; if (hMsgQueueHandle != IntPtr.Zero) { WIN32.CloseMsgQueue(hMsgQueueHandle); } hMsgQueueHandle = IntPtr.Zero; }
/// <summary> /// Get last system error message. /// </summary> /// <returns>Returns last error message occured.</returns> public string GetLastErrorMessage() { return(WIN32.GetLastErrorMessage()); }
/// <summary> /// Get last system error code. /// </summary> /// <returns>Returns last error code occured.</returns> public int GetLastError() { return(WIN32.GetLastError()); }
/// <summary> PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class. </summary> /// <remarks>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class.</remarks> public bool UnregisterKey(int vk, KeyModifiers mod) { return(WIN32.UnregisterFunc1(mod, vk)); }
/// <summary> PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class. </summary> /// <remarks>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class.</remarks> public bool RegisterKey(int vk, KeyModifiers mod) { WIN32.UnregisterFunc1(mod, vk); return(WIN32.RegisterHotKey(this.Hwnd, (int)(vk + 0x1000), mod, vk)); }