예제 #1
0
 private void BeginListening()
 {
     if (!listening)
     {
         listening    = true;
         callback     = new Win32.CBTCallback(ModalListener);
         handleToHook = Win32.SetWindowsHookEx(CbtHookType, callback, IntPtr.Zero, Win32.GetCurrentThreadId());
     }
 }
예제 #2
0
파일: Desktop.cs 프로젝트: sillsdev/wesay
 private IntPtr CurrentHandle()
 {
     //return Win32.GetThreadDesktop( AppDomain.GetCurrentThreadId());
     return(Win32.GetThreadDesktop(Win32.GetCurrentThreadId()));
 }
예제 #3
0
 private void BeginListening()
 {
     if (!listening)
     {
         listening = true;
         // Note: the callback is saved as a member to keep the CLR from shuffling off the pointer
         // before the callback is used.
         // If we try to assign the call back "inline" we get memory violation errors.
         callback     = Callback_ModalListener;
         handleToHook = Win32.SetWindowsHookEx(HCBT_ACTIVATE, callback, IntPtr.Zero, Win32.GetCurrentThreadId());
     }
 }
예제 #4
0
 private static IntPtr CurrentHandle()
 {
     return(Win32.GetThreadDesktop(Win32.GetCurrentThreadId()));
 }