72{
76
78
79
80
82
83#ifdef VFD_PNP
84#define VFD_PNP_TAG "(Plug & Play version)"
85#else
86#define VFD_PNP_TAG
87#endif
88
91
93 ("[VFD] Running on Windows NT %lu.%lu build %lu\n",
95
98
99#ifdef VFD_PNP
100
101
102
103
104
107 VFD_DRIVER_EXTENSION_ID,
109 &driver_extension);
110
112 VFDTRACE(0, (
"[VFD] IoAllocateDriverObjectExtension - %s\n",
115 }
116
117#else
118
119
120
121
122
125
126 if (!driver_extension) {
127 VFDTRACE(0, (
"[VFD] failed to allocate the driver extension.\n"));
129 }
130
131#endif
132
134
135
136
137
139
140
141
142
145#if DBG
147#endif
148
150
151 VFDTRACE(0, (
"[VFD] Registry Path: %ws\n",
153
156 params[0].EntryContext = &number_of_devices;
158 params[0].DefaultData = &default_devs;
160
161#if DBG
164 params[1].EntryContext = &TraceFlags;
166 params[1].DefaultData = &default_trace;
168#endif
169
174
176 number_of_devices == 0 ||
179 }
180
181 VFDTRACE(0,(
"[VFD] NumberOfDevices = %lu\n", number_of_devices));
182 VFDTRACE(0,(
"[VFD] TraceFlags = 0x%08x\n", TraceFlags));
183 }
184 else {
185 VFDTRACE(0, (
"[VFD] failed to allocate the registry path buffer.\n"));
186
187 }
188
189
190
191
192 do {
193#ifdef VFD_PNP
195#else
197#endif
198
200 break;
201 }
202 }
204
206
207
208
210
212 }
213
214
215
221
222#ifdef VFD_PNP
226 DriverObject->DriverExtension->AddDevice = VfdAddDevice;
227#endif
228
230
231
232
233
236
238 ("[VFD] driver initialized with %lu devices.\n",
240
242}
#define NT_SUCCESS(StatCode)
#define PsGetVersion(a, b, c, d)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLenum const GLfloat * params
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_DIRECT
#define RTL_REGISTRY_OPTIONAL
VOID NTAPI IoRegisterDriverReinitialization(IN PDRIVER_OBJECT DriverObject, IN PDRIVER_REINITIALIZE ReinitRoutine, IN PVOID Context)
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
#define IRP_MJ_DEVICE_CONTROL
UNICODE_STRING RegistryPath
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
#define VFDTRACE(LEVEL, STRING)
NTSTATUS VfdCreateDevice(IN PDRIVER_OBJECT DriverObject, OUT PVOID Parameter)
VOID NTAPI VfdUnloadDriver(IN PDRIVER_OBJECT DriverObject)
VOID VfdFreeUnicode(PUNICODE_STRING str)
NTSTATUS NTAPI VfdCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
PWSTR VfdCopyUnicode(PUNICODE_STRING dst, PUNICODE_STRING src)
static VOID NTAPI VfdReinitialize(IN PDRIVER_OBJECT DriverObject, IN PVOID Context, IN ULONG Count)
struct _VFD_DRIVER_EXTENSION * PVFD_DRIVER_EXTENSION
NTSTATUS NTAPI VfdDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS NTAPI VfdReadWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define VFD_REG_TRACE_FLAGS
#define VFD_REG_DEVICE_NUMBER
#define VFD_MAXIMUM_DEVICES
#define VFD_DEFAULT_DEVICES
#define VFD_DRIVER_VERSION_STR
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
#define IRP_MJ_SYSTEM_CONTROL