コード例 #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();
     }
 }
コード例 #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);
     }
 }
コード例 #3
0
 public void SetRawInputBypass(uint instanceHandle, bool enableBypass)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetRawInputBypass(instanceHandle, enableBypass);
     }
     else
     {
         ProtoInput64.SetRawInputBypass(instanceHandle, enableBypass);
     }
 }
コード例 #4
0
 public void SetDinputHookAlsoHooksGetDeviceState(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DinputHookAlsoHooksGetDeviceState(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.DinputHookAlsoHooksGetDeviceState(instanceHandle, enable);
     }
 }
コード例 #5
0
 public void SetCreateSingleHIDName(uint instanceHandle, string name)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetCreateSingleHIDName(instanceHandle, name);
     }
     else
     {
         ProtoInput64.SetCreateSingleHIDName(instanceHandle, name);
     }
 }
コード例 #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);
     }
 }
コード例 #7
0
 public void SetShowCursorWhenImageUpdated(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetShowCursorWhenImageUpdated(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.SetShowCursorWhenImageUpdated(instanceHandle, enable);
     }
 }
コード例 #8
0
 public void DisableMessageFilter(uint instanceHandle, ProtoMessageFilterIDs filterID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DisableMessageFilter(instanceHandle, filterID);
     }
     else
     {
         ProtoInput64.DisableMessageFilter(instanceHandle, filterID);
     }
 }
コード例 #9
0
 public void DisableMessageBlock(uint instanceHandle, uint messageID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.DisableMessageBlock(instanceHandle, messageID);
     }
     else
     {
         ProtoInput64.DisableMessageBlock(instanceHandle, messageID);
     }
 }
コード例 #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));
     }
 }
コード例 #11
0
 public void UninstallHook(uint instanceHandle, ProtoHookIDs hookID)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.UninstallHook(instanceHandle, hookID);
     }
     else
     {
         ProtoInput64.UninstallHook(instanceHandle, hookID);
     }
 }
コード例 #12
0
 public uint EasyHookStealthInjectRuntime(uint pid, string dllFolderPath)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.EasyHookStealthInjectRuntime(pid, dllFolderPath));
     }
     else
     {
         return(ProtoInput64.EasyHookStealthInjectRuntime(pid, dllFolderPath));
     }
 }
コード例 #13
0
 public uint RemoteLoadLibraryInjectRuntime(uint pid, string dllFolderPath)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.RemoteLoadLibraryInjectRuntime(pid, dllFolderPath));
     }
     else
     {
         return(ProtoInput64.RemoteLoadLibraryInjectRuntime(pid, dllFolderPath));
     }
 }
コード例 #14
0
 public void RestartExplorer()
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.RestartExplorer();
     }
     else
     {
         ProtoInput64.RestartExplorer();
     }
 }
コード例 #15
0
 public void AddSelectedKeyboardHandle(uint instanceHandle, uint keyboardHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AddSelectedKeyboardHandle(instanceHandle, keyboardHandle);
     }
     else
     {
         ProtoInput64.AddSelectedKeyboardHandle(instanceHandle, keyboardHandle);
     }
 }
コード例 #16
0
 public void WakeUpProcess(uint instanceHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.WakeUpProcess(instanceHandle);
     }
     else
     {
         ProtoInput64.WakeUpProcess(instanceHandle);
     }
 }
コード例 #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);
     }
 }
コード例 #18
0
 public void UpdateMainWindowHandle(uint instanceHandle, ulong hwnd)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.UpdateMainWindowHandle(instanceHandle, hwnd);
     }
     else
     {
         ProtoInput64.UpdateMainWindowHandle(instanceHandle, hwnd);
     }
 }
コード例 #19
0
 public void SetUseOpenXinput(uint instanceHandle, bool useOpenXinput)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetUseOpenXinput(instanceHandle, useOpenXinput);
     }
     else
     {
         ProtoInput64.SetUseOpenXinput(instanceHandle, useOpenXinput);
     }
 }
コード例 #20
0
 public void SetupState(uint instanceHandle, int instanceIndex)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetupState(instanceHandle, instanceIndex);
     }
     else
     {
         ProtoInput64.SetupState(instanceHandle, instanceIndex);
     }
 }
コード例 #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);
     }
 }
コード例 #22
0
 public void StopFocusMessageLoop(uint instanceHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.StopFocusMessageLoop(instanceHandle);
     }
     else
     {
         ProtoInput64.StopFocusMessageLoop(instanceHandle);
     }
 }
コード例 #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);
     }
 }
コード例 #24
0
 public void SetDrawFakeCursor(uint instanceHandle, bool enable)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetDrawFakeCursor(instanceHandle, enable);
     }
     else
     {
         ProtoInput64.SetDrawFakeCursor(instanceHandle, enable);
     }
 }
コード例 #25
0
 public void SetCursorClipOptions(uint instanceHandle, bool useFakeClipCursor)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetCursorClipOptions(instanceHandle, useFakeClipCursor);
     }
     else
     {
         ProtoInput64.SetCursorClipOptions(instanceHandle, useFakeClipCursor);
     }
 }
コード例 #26
0
 public void SetExternalFreezeFakeInput(uint instanceHandle, bool enableFreeze)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetExternalFreezeFakeInput(instanceHandle, enableFreeze);
     }
     else
     {
         ProtoInput64.SetExternalFreezeFakeInput(instanceHandle, enableFreeze);
     }
 }
コード例 #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);
     }
 }
コード例 #28
0
 public void AddSelectedMouseHandle(uint instanceHandle, uint mouseHandle)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.AddSelectedMouseHandle(instanceHandle, mouseHandle);
     }
     else
     {
         ProtoInput64.AddSelectedMouseHandle(instanceHandle, mouseHandle);
     }
 }
コード例 #29
0
 public void SetTaskbarAutohide(bool autohide)
 {
     if (IntPtr.Size == 4)
     {
         ProtoInput32.SetTaskbarVisibility(autohide, false);
     }
     else
     {
         ProtoInput64.SetTaskbarVisibility(autohide, false);
     }
 }
コード例 #30
0
 public uint LockInput(bool lockInput)
 {
     if (IntPtr.Size == 4)
     {
         return(ProtoInput32.LockInput(lockInput));
     }
     else
     {
         return(ProtoInput64.LockInput(lockInput));
     }
 }