Beispiel #1
0
 /// <summary>
 /// What this does and why:
 /// explorer.exe is responsible for the desktop window, the taskbar, start menu etc.
 /// If the explorer.exe process is killed, all this vanishes
 /// (however this also appears to break the low-level mouse/keyboard hooks and raw input for some reason when exporer.exe is restarted)
 /// Instead, these functions will suspend all the threads of explorer.exe so it doesn't do anything.
 /// This now means you can't accidentally click the start menu, or open the start menu with the windows key, alt+tab, win+tab, right click the desktop, etc...
 ///
 /// Another benifit of suspending the threads is that when explorer.exe is running, it appears to override the alt+tab menu with a fancier Windows 10 one
 /// (when explorer.exe is killed it uses an older style one).
 /// However when it's suspended, the new alt+tab menu does nothing so it doesn't use the fallback
 ///
 /// You MUST call RestartExplorer after you finish or the desktop will be broken and the only way out is to kill explorer.exe and restart it with task manager (if it opens)
 /// </summary>
 public void SuspendExplorer()
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SuspendExplorer();
     }
     else
     {
         ProtoInput64.SuspendExplorer();
     }
 }
Beispiel #2
0
 public void SetToggleFakeCursorVisibilityShortcut(uint instanceHandle, bool enabled, uint vkey)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetToggleFakeCursorVisibilityShortcut(instanceHandle, enabled, vkey);
     }
     else
     {
         ProtoInput64.SetToggleFakeCursorVisibilityShortcut(instanceHandle, enabled, vkey);
     }
 }
Beispiel #3
0
 public void SetRawInputBypass(uint instanceHandle, bool enableBypass)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetRawInputBypass(instanceHandle, enableBypass);
     }
     else
     {
         ProtoInput64.SetRawInputBypass(instanceHandle, enableBypass);
     }
 }
Beispiel #4
0
 public void SetDinputHookAlsoHooksGetDeviceState(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DinputHookAlsoHooksGetDeviceState(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.DinputHookAlsoHooksGetDeviceState(instanceHandle, enable);
     }
 }
Beispiel #5
0
 public void SetCreateSingleHIDName(uint instanceHandle, string name)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetCreateSingleHIDName(instanceHandle, name);
     }
     else
     {
         ProtoInput64.SetCreateSingleHIDName(instanceHandle, name);
     }
 }
Beispiel #6
0
 /// <summary>
 /// This MUST be called before calling InstallHook on the Xinput hook
 /// </summary>
 /// <param name="instanceHandle"></param>
 /// <param name="controllerIndex"></param>
 public void SetUseDinputRedirection(uint instanceHandle, bool useRedirection)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetUseDinputRedirection(instanceHandle, useRedirection);
     }
     else
     {
         ProtoInput64.SetUseDinputRedirection(instanceHandle, useRedirection);
     }
 }
Beispiel #7
0
 public void SetShowCursorWhenImageUpdated(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetShowCursorWhenImageUpdated(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.SetShowCursorWhenImageUpdated(instanceHandle, enable);
     }
 }
Beispiel #8
0
 public void DisableMessageFilter(uint instanceHandle, ProtoMessageFilterIDs filterID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DisableMessageFilter(instanceHandle, filterID);
     }
     else
     {
         ProtoInput64.DisableMessageFilter(instanceHandle, filterID);
     }
 }
Beispiel #9
0
 public void DisableMessageBlock(uint instanceHandle, uint messageID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DisableMessageBlock(instanceHandle, messageID);
     }
     else
     {
         ProtoInput64.DisableMessageBlock(instanceHandle, messageID);
     }
 }
Beispiel #10
0
 public uint EasyHookInjectStartup(string exePath, string commandLine, uint processCreationFlags, string dllFolderPath, out uint pid, IntPtr environment)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.EasyHookInjectStartup(exePath, commandLine, processCreationFlags, dllFolderPath, out pid, environment));
     }
     else
     {
         return(ProtoInput64.EasyHookInjectStartup(exePath, commandLine, processCreationFlags, dllFolderPath, out pid, environment));
     }
 }
Beispiel #11
0
 public void UninstallHook(uint instanceHandle, ProtoHookIDs hookID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.UninstallHook(instanceHandle, hookID);
     }
     else
     {
         ProtoInput64.UninstallHook(instanceHandle, hookID);
     }
 }
Beispiel #12
0
 public uint EasyHookStealthInjectRuntime(uint pid, string dllFolderPath)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.EasyHookStealthInjectRuntime(pid, dllFolderPath));
     }
     else
     {
         return(ProtoInput64.EasyHookStealthInjectRuntime(pid, dllFolderPath));
     }
 }
Beispiel #13
0
 public uint RemoteLoadLibraryInjectRuntime(uint pid, string dllFolderPath)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.RemoteLoadLibraryInjectRuntime(pid, dllFolderPath));
     }
     else
     {
         return(ProtoInput64.RemoteLoadLibraryInjectRuntime(pid, dllFolderPath));
     }
 }
Beispiel #14
0
 public void RestartExplorer()
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.RestartExplorer();
     }
     else
     {
         ProtoInput64.RestartExplorer();
     }
 }
Beispiel #15
0
 public void AddSelectedKeyboardHandle(uint instanceHandle, uint keyboardHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AddSelectedKeyboardHandle(instanceHandle, keyboardHandle);
     }
     else
     {
         ProtoInput64.AddSelectedKeyboardHandle(instanceHandle, keyboardHandle);
     }
 }
Beispiel #16
0
 public void WakeUpProcess(uint instanceHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.WakeUpProcess(instanceHandle);
     }
     else
     {
         ProtoInput64.WakeUpProcess(instanceHandle);
     }
 }
Beispiel #17
0
 public void SetControllerIndex(uint instanceHandle, uint controllerIndex, uint controllerIndex2, uint controllerIndex3, uint controllerIndex4)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetControllerIndex(instanceHandle, controllerIndex, controllerIndex2, controllerIndex3, controllerIndex4);
     }
     else
     {
         ProtoInput64.SetControllerIndex(instanceHandle, controllerIndex, controllerIndex2, controllerIndex3, controllerIndex4);
     }
 }
Beispiel #18
0
 public void UpdateMainWindowHandle(uint instanceHandle, ulong hwnd)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.UpdateMainWindowHandle(instanceHandle, hwnd);
     }
     else
     {
         ProtoInput64.UpdateMainWindowHandle(instanceHandle, hwnd);
     }
 }
Beispiel #19
0
 public void SetUseOpenXinput(uint instanceHandle, bool useOpenXinput)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetUseOpenXinput(instanceHandle, useOpenXinput);
     }
     else
     {
         ProtoInput64.SetUseOpenXinput(instanceHandle, useOpenXinput);
     }
 }
Beispiel #20
0
 public void SetupState(uint instanceHandle, int instanceIndex)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetupState(instanceHandle, instanceIndex);
     }
     else
     {
         ProtoInput64.SetupState(instanceHandle, instanceIndex);
     }
 }
Beispiel #21
0
 /// <summary>
 /// Require RenameHandlesHookHookID hook
 /// </summary>
 /// <param name="instanceHandle"></param>
 /// <param name="name"></param>
 public void AddNamedPipeToRename(uint instanceHandle, string name)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AddNamedPipeToRename(instanceHandle, name);
     }
     else
     {
         ProtoInput64.AddNamedPipeToRename(instanceHandle, name);
     }
 }
Beispiel #22
0
 public void StopFocusMessageLoop(uint instanceHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.StopFocusMessageLoop(instanceHandle);
     }
     else
     {
         ProtoInput64.StopFocusMessageLoop(instanceHandle);
     }
 }
Beispiel #23
0
 public void SetSetWindowPosSettings(uint instanceHandle, int posx, int posy, int width, int height)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetSetWindowPosSettings(instanceHandle, posx, posy, width, height);
     }
     else
     {
         ProtoInput64.SetSetWindowPosSettings(instanceHandle, posx, posy, width, height);
     }
 }
Beispiel #24
0
 public void SetDrawFakeCursor(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetDrawFakeCursor(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.SetDrawFakeCursor(instanceHandle, enable);
     }
 }
Beispiel #25
0
 public void SetCursorClipOptions(uint instanceHandle, bool useFakeClipCursor)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetCursorClipOptions(instanceHandle, useFakeClipCursor);
     }
     else
     {
         ProtoInput64.SetCursorClipOptions(instanceHandle, useFakeClipCursor);
     }
 }
Beispiel #26
0
 public void SetExternalFreezeFakeInput(uint instanceHandle, bool enableFreeze)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetExternalFreezeFakeInput(instanceHandle, enableFreeze);
     }
     else
     {
         ProtoInput64.SetExternalFreezeFakeInput(instanceHandle, enableFreeze);
     }
 }
Beispiel #27
0
 public void AllowFakeCursorOutOfBounds(uint instanceHandle, bool allowOutOfBounds, bool extendBounds)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AllowFakeCursorOutOfBounds(instanceHandle, allowOutOfBounds, extendBounds);
     }
     else
     {
         ProtoInput64.AllowFakeCursorOutOfBounds(instanceHandle, allowOutOfBounds, extendBounds);
     }
 }
Beispiel #28
0
 public void AddSelectedMouseHandle(uint instanceHandle, uint mouseHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AddSelectedMouseHandle(instanceHandle, mouseHandle);
     }
     else
     {
         ProtoInput64.AddSelectedMouseHandle(instanceHandle, mouseHandle);
     }
 }
Beispiel #29
0
 public void SetTaskbarAutohide(bool autohide)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetTaskbarVisibility(autohide, false);
     }
     else
     {
         ProtoInput64.SetTaskbarVisibility(autohide, false);
     }
 }
Beispiel #30
0
 public uint LockInput(bool lockInput)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.LockInput(lockInput));
     }
     else
     {
         return(ProtoInput64.LockInput(lockInput));
     }
 }