mirror of
https://gitea.tendokyu.moe/TeamTofuShop/taitools.git
synced 2026-09-22 22:28:06 +03:00
27 lines
782 B
C
27 lines
782 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
|
|
|
|
struct winusb_dev {
|
|
HANDLE fd;
|
|
GUID class_guid;
|
|
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;
|
|
void (*read_pipe)(void *ctx, uint8_t pipe_id, uint8_t *bfr, uint32_t bfr_len);
|
|
void (*write_pipe)(void *ctx, uint8_t pipe_id, uint8_t *bfr, uint32_t bfr_len);
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
HRESULT winusb_add_phantom_dev(const struct winusb_dev *dev);
|
|
void winusb_hook_insert_hooks(HMODULE target);
|