blob: 5bf8853fcc14dddfcb5dc6ded55c32da2a2016f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*++
Copyright (c) 1990-2000 Microsoft Corporation
Module Name:
driver.h
Abstract:
This is a C version of a very simple sample driver that illustrates
how to use the driver framework and demonstrates best practices.
--*/
#define INITGUID
#include <ntddk.h>
#include <wdf.h>
#include "device.h"
#include "queue.h"
typedef struct _REQUEST_CONTEXT {
//
// Count to use when trying to claim completion ownership of a cancelable
// request when clearing the cancel routine. If the caller can clear the
// cancel routine successfully, the caller is *NOT* responsible for decrementing
// the count if the request is going to be completed immediately (and a
// cancel routine is not going to be set in the future).
//
LONG CancelCompletionOwnershipCount;
} REQUEST_CONTEXT, *PREQUEST_CONTEXT;
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(REQUEST_CONTEXT, RequestGetContext);
//
// WDFDRIVER Events
//
DRIVER_INITIALIZE DriverEntry;
EVT_WDF_DRIVER_DEVICE_ADD EchoEvtDeviceAdd;
NTSTATUS
EchoPrintDriverVersion(
);
|