prototypes.h
来自「serial port read/write,对USB和com端口的数据读写可以」· C头文件 代码 · 共 62 行
H
62 行
#pragma warning(push)
#pragma warning(disable:4115) // named typedef in parenthesis
#pragma warning(disable:4200) // nameless struct/union
#pragma warning(disable:4201) // nameless struct/union
#pragma warning(disable:4214) // bit field types other than int
#include "ntddk.h"
#include "wdf.h"
#pragma warning(pop)
#define __DRIVER_NAME "BASIC: "
/*declaration of the device context. we have to declare the type of the
device context, and an accessor function name that will return to us
a pointer to the device context.*/
typedef struct _DEVICE_CONTEXT {
WDFQUEUE IoDefaultQueue;
} DEVICE_CONTEXT, *PDEVICE_CONTEXT;
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(DEVICE_CONTEXT, GetDeviceContext);
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
);
NTSTATUS
EvtDeviceAdd(
IN WDFDRIVER Driver,
IN PWDFDEVICE_INIT DeviceInit
);
NTSTATUS
EvtDevicePrepareHardware(
IN WDFDEVICE Device,
IN WDFCMRESLIST ResourceList,
IN WDFCMRESLIST ResourceListTranslated
);
VOID
EvtDeviceIoDefault(
IN WDFQUEUE Queue,
IN WDFREQUEST Request
);
NTSTATUS
EvtDeviceD0Entry(
IN WDFDEVICE Device,
IN WDF_POWER_DEVICE_STATE PreviousState
);
NTSTATUS
EvtDeviceD0Exit(
IN WDFDEVICE Device,
IN WDF_POWER_DEVICE_STATE TargetState
);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?