mirror of
https://gitea.tendokyu.moe/TeamTofuShop/taitools.git
synced 2026-09-22 22:28:06 +03:00
28 lines
756 B
C
28 lines
756 B
C
#pragma once
|
|
#include <windows.h>
|
|
#include <stdint.h>
|
|
#include <winusb.h>
|
|
|
|
#pragma pack(push,1)
|
|
|
|
// winusb - hooks for winusb ident, read and write passed to device
|
|
// usio - providor for winusb, passes along read/write
|
|
// ll3io - gives usio the data to write
|
|
|
|
typedef void (*winusb_pipe_op_t) (void *ctx, uint8_t *bfr, uint32_t bfr_len, uint32_t *len_tx);
|
|
|
|
struct winusb_dev {
|
|
HANDLE fd;
|
|
const wchar_t *path;
|
|
//uint8_t read_pipe_id; // duno if this ever needs to change?
|
|
//uint8_t write_pipe_id;
|
|
struct _USB_DEVICE_DESCRIPTOR descriptor;
|
|
winusb_pipe_op_t read_pipe;
|
|
winusb_pipe_op_t write_pipe;
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
HRESULT winusb_add_phantom_dev(const struct winusb_dev *dev);
|
|
void winusb_hook_insert_hooks(HMODULE target);
|