⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 featurereports.h

📁 一本在讲述USB驱动程式的书 及其范例原码
💻 H
字号:
// FeatureReports.h -- Declaration of feature report structures for HIDFAKE driver
// Copyright (C) 2002 by Walter Oney
// All rights reserved

// The HIDFAKE sample driver uses feature reports for out-of-bad communication
// between an application and the driver. This file, which is shared between
// the user-mode test applet and the driver, defines the format of the feature
// reports.

#pragma once

#include <pshpack1.h>

// Dummy VID/PID values to simplify test applet's scan. You *must* use your own
// unique values here, or else you'll likely collide with some other vendor's
// fake HID device.

#define HIDFAKE_VID		0x1234
#define HIDFAKE_PID		0x5678

///////////////////////////////////////////////////////////////////////////////

typedef struct _FEATURE_REPORT_GET_VERSION {
	UCHAR id;					// feature id (FEATURE_CODE_GET_VERSION)
	ULONG Version;				// driver revision level
	} FEATURE_REPORT_GET_VERSION, *PFEATURE_REPORT_GET_VERSION;

#define FEATURE_CODE_GET_VERSION	2

///////////////////////////////////////////////////////////////////////////////

typedef struct _FEATURE_REPORT_SET_BUTTON {
	UCHAR id;					// feature id (FEATURE_CODE_SET_BUTTON)
	UCHAR ButtonDown;			// TRUE if button 1 considered down, FALSE otherwise
	} FEATURE_REPORT_SET_BUTTON, *PFEATURE_REPORT_SET_BUTTON;

#define FEATURE_CODE_SET_BUTTON		3

#include <poppack.h>

⌨️ 快捷键说明

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