blob: 5388e33c3e315b28d02be23d2bc29e1fe591a003 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
fail_library1.c
Abstract:
Template library that can be used together with a driver for testing the
seamless build feature of SDV via defect injection. This library is not
functional and not intended as a sample for real software development
projects. It only provides a skeleton for building a defective library.
Environment:
Kernel mode
--*/
#include "fail_library1.h"
VOID
SDVTest_wdf_DriverCreate()
{
return;
}
VOID
SDVTest_wdf_DeviceInitAPI(
_In_ PWDFDEVICE_INIT DeviceInit
)
{
WdfDeviceInitSetIoType(DeviceInit, WdfDeviceIoBuffered);
return;
}
VOID
SDVTest_wdf_MdlAfterReqCompletionIoctl(
_In_ WDFREQUEST Request,
_In_ PMDL Mdl
)
{
NTSTATUS status;
status = WdfRequestRetrieveInputWdmMdl(Request, &Mdl);
if(status==STATUS_SUCCESS)
{
return;
}
else
{
return;
}
}
VOID
SDVTest_wdf_MemoryAfterReqCompletionIntIoctlAdd(
_In_ WDFMEMORY Memory
)
{
WDF_MEMORY_DESCRIPTOR memoryDescriptor;
WDF_MEMORY_DESCRIPTOR_INIT_HANDLE(&memoryDescriptor, Memory, NULL);
return;
}
VOID
SDVTest_wdf_MdlAfterReqCompletionIntIoctlAdd(
_In_ PMDL Mdl
)
{
ULONG byteOffset;
byteOffset = MmGetMdlByteOffset(Mdl);
return;
}
VOID
SDVTest_wdf_MarkCancOnCancReqDispatch(
_In_ WDFREQUEST Request
)
{
WdfRequestMarkCancelable(Request, SDVTest_EvtRequestCancel);
return;
}
VOID
SDVTest_EvtRequestCancel(
_In_ WDFREQUEST Request
)
{
WdfRequestComplete(Request, STATUS_CANCELLED);
}
|