-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowsAPI.cs
More file actions
32 lines (22 loc) · 962 Bytes
/
Copy pathWindowsAPI.cs
File metadata and controls
32 lines (22 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Runtime.InteropServices;
namespace SetMouseForGames;
internal class WindowsAPI
{
[DllImport("user32.dll")]
internal static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
[DllImport("user32.dll")]
internal static extern bool UnregisterHotKey(IntPtr hWnd, int id);
[DllImport("user32.dll")]
internal static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref int pvParam, uint fWinIni);
[DllImport("user32.dll")]
internal static extern bool SystemParametersInfo(uint uiAction, uint uiParam, int[] pvParam, uint fWinIni);
[DllImport("User32.dll")]
internal static extern Boolean SystemParametersInfo(UInt32 uiAction, UInt32 uiParam, UInt32 pvParam, UInt32 fWinIni);
internal enum Windows_SPIs
{
SPI_GETMOUSE = 0x0003,
SPI_GETWHEELSCROLLLINES = 0x0068,
SPI_GETMOUSESPEED = 0x0070,
SPI_SETMOUSESPEED = 0x0071,
}
}