common.h

来自「winddk src目录下的WDM源码压缩!」· C头文件 代码 · 共 43 行

H
43
字号

//
// Custom control codes are defined here. They are to be used for sideband 
// communication with the hid minidriver. These control codes are sent to 
// the hid minidriver using Hid_GetFeature() API to a custom collection 
// defined especially to handle such requests.
//
#define  HIDMINI_CONTROL_CODE_GET_ATTRIBUTES              0x00
#define  HIDMINI_CONTROL_CODE_DUMMY1                             0x01
#define  HIDMINI_CONTROL_CODE_DUMMY2                             0x02


//
// This is the report id of the collection to which the control codes are sent
//
#define CONTROL_COLLECTION_REPORT_ID                              0x01

#include <pshpack1.h>

typedef struct _HIDMINI_CONTROL_INFO {

    //report ID of the collection to which the control request is sent

    UCHAR    ReportId;   

    // One byte control code (user-defined) for communication with hid 
    // mini driver
    
    UCHAR   ControlCode;

    // This is a placeholder for address of the buffer allocated by the caller
    // equal to the size of ControlBufferLength.

    UCHAR   ControlBuffer[];
    
} HIDMINI_CONTROL_INFO, * PHIDMINI_CONTROL_INFO;

#include <poppack.h>




⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?