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;
        }
Esempio n. 2
0
 /// <summary>
 /// Get last system error message.
 /// </summary>
 /// <returns>Returns last error message occured.</returns>
 public string GetLastErrorMessage()
 {
     return(WIN32.GetLastErrorMessage());
 }
Esempio n. 3
0
 /// <summary>
 /// Get last system error code.
 /// </summary>
 /// <returns>Returns last error code occured.</returns>
 public int GetLastError()
 {
     return(WIN32.GetLastError());
 }
Esempio n. 4
0
 /// <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));
 }
Esempio n. 5
0
 /// <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));
 }