diff options
| author | navewindre <nw@moneybot.cc> | 2024-07-12 00:55:39 +0200 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2024-07-12 00:55:39 +0200 |
| commit | 2ebf959ec02048c15323e1bbfc63faedcf5067b6 (patch) | |
| tree | 18862ba5d3b4be44294c0a81317d31eace7ee150 /src/mouse.h | |
| parent | ecca2728f1a583ea484f8bdcda390a30e4906f1d (diff) | |
ha haaa
Diffstat (limited to 'src/mouse.h')
| -rw-r--r-- | src/mouse.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mouse.h b/src/mouse.h new file mode 100644 index 0000000..ef41881 --- /dev/null +++ b/src/mouse.h @@ -0,0 +1,32 @@ +//|_ _ _. _ ._ |_ _. _ | +//| | (/_ (_| \/ (/_ | | | | (_| (_ |< + +#include <windows.h> +#include <winternl.h> +#pragma comment( lib, "ntdll.lib" ) + +#include "util.h" + +struct LOGITECH_MOUSE_IO { + char button; + char x; + char y; + char wheel; +private: + char unk; +}; + +HANDLE nt_init_device( const char* device_name ) { + UNICODE_STRING name; + OBJECT_ATTRIBUTES attr; + + RtlInitUnicodeString(&name, u_ansi_to_widebyte( device_name ) ); + InitializeObjectAttributes( &attr, &name, 0, NULL, NULL ); + + NTSTATUS status = NtCreateFile(&g_input, GENERIC_WRITE | SYNCHRONIZE, &attr, &g_io, 0, + FILE_ATTRIBUTE_NORMAL, 0, 3, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, 0, 0); + + return status; +} + +HANDLE mouse_open( )
\ No newline at end of file |
