public InterceptAltTab(IntPtr hWnd, FunPtr onAltTab, FunPtr onShiftAltTab)
 {
     try {
         setFunctionPointers(hWnd, onAltTab, onShiftAltTab);
         installAltTabHooks();
     }
     catch (DllNotFoundException e) {
         MessageBox.Show("Couldn't find the module key_interceptor.dll. Program will exit.", "Module not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
     catch (EntryPointNotFoundException e) {
         MessageBox.Show("The module key_interceptor.dll appears to be damaged. Program will exit.", "Module is damaged", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
 }
Exemple #2
0
 public Fun (FunPtr p) { f = p; }}
 static extern void setFunctionPointers(IntPtr hWnd, FunPtr fp, FunPtr fp2);