ReactOS 0.4.16-dev-1946-g52006dd
version.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 Version.cpp
8
9Abstract:
10
11 This module forms a loadable library from the WDF core libs
12
13Revision History:
14
15--*/
16
17#include <stdarg.h>
18#include <stddef.h>
19#include <stdio.h>
20#include <string.h>
21#include <ntverp.h>
22
23extern "C" {
24#include <ntddk.h>
25#include <ntstrsafe.h>
26}
27
28#define FX_DYNAMICS_GENERATE_TABLE 1
29
30#include "fx.hpp"
31
32#include <fxldr.h>
33#include "fxbugcheck.h"
34// #include "wdfversionlog.h"
35#include "reactos_special.h"
36
37#define DRIVER_OBJECT_EXTENSION_IDENTIFIER DriverEntry
38#define DRIVER_PARAMETERS L"Parameters"
39#define REGISTRY_KMDF_MAJOR_VERSION L"MajorVersion"
40#define REGISTRY_KMDF_MINOR_VERSION L"MinorVersion"
41#define REGISTRY_KMDF_BUILD_NUMBER L"BuildNumber"
42
43//-----------------------------------------------------------------------------
44// These header files are referenced in order to make internal structures
45// available in public symbols. Various WDFKD debug commands use these
46// internal structures to provide information about WDF.
47//-----------------------------------------------------------------------------
48#include "fxifr.h"
49
50extern "C" {
51
52//
53// This is the collection of all structure/types to be make public.
54// This union forces the structure type-info into the PDB file.
55//
56union {
57
73
75
76} // extern "C" end
77
78//----------------------------------------- ------------------------------------
79
80extern "C" {
81
82#include "fxdynamics.h"
83
84#include "fxlibrarycommon.h"
85
86#ifdef __REACTOS__
87#define KMDF_DEFAULT_NAME "Wdf" \
88 LITERAL(__WDF_MAJOR_VERSION_STRING) \
89 "000" //minor version
90#else
91#define KMDF_DEFAULT_NAME "Wdf" ## \
92 LITERAL(__WDF_MAJOR_VERSION_STRING) ## \
93 "000" //minor version
94#endif
95
96//-----------------------------------------------------------------------------
97// local prototype definitions
98//-----------------------------------------------------------------------------
99extern "C"
100DRIVER_UNLOAD DriverUnload;
101
102extern "C"
103DRIVER_INITIALIZE DriverEntry;
104
105extern "C"
110
112
114
116
117} // extern "C"
118
119
120//-----------------------------------------------------------------------------
121//
122//-----------------------------------------------------------------------------
123extern "C"
126NTAPI
128 VOID
129 );
130
131extern "C"
134NTAPI
136 VOID
137 );
138
139extern "C"
142NTAPI
147 );
148
149extern "C"
152NTAPI
156 );
157
158extern "C"
159VOID
161 VOID
162 );
163
164VOID
166 VOID
167 );
168
169VOID
173 );
174
175VOID
178 );
179
180typedef struct _DRV_EXTENSION {
183
184//-----------------------------------------------------------------------------
185// Library registeration information
186//-----------------------------------------------------------------------------
187extern "C" {
188#pragma prefast(suppress:__WARNING_ENCODE_MEMBER_FUNCTION_POINTER, "kernel component.");
190 sizeof(WDF_LIBRARY_INFO),
195 { __WDF_MAJOR_VERSION, __WDF_MINOR_VERSION, __WDF_BUILD_NUMBER }
196};
197
198} // extern "C" end
199
200extern "C"
202NTAPI
206 )
207{
209
212
214
216 case IRP_MJ_CREATE:
217 //
218 // To limit our exposure for this device object, only allow kernel mode
219 // creates.
220 //
221 if (Irp->RequestorMode == KernelMode) {
223 }
224 break;
225
226 case IRP_MJ_CLEANUP:
227 case IRP_MJ_CLOSE:
228 //
229 // Since we allowed a create to succeed, succeed the cleanup and close
230 //
232 break;
233 }
234
235 Irp->IoStatus.Status = status;
236 Irp->IoStatus.Information = 0x0;
238
239 return status;
240}
241
242//-----------------------------------------------------------------------------
243//
244//-----------------------------------------------------------------------------
245
246#define KMDF_DEVICE_NAME L"\\Device\\KMDF"
247
252 )
253{
255 ULONG i;
256
257 i = 0;
258
259 //
260 // Repeatedly try to create a named device object until we run out of buffer
261 // space or we succeed.
262 //
263 do {
265 if (!NT_SUCCESS(status)) {
266 return status;
267 }
268
269 //
270 // Create a device with no device extension
271 //
274 0,
277 0,
278 FALSE,
280 );
282
283 if (NT_SUCCESS(status)) {
284 //
285 // Clear the initializing bit now because the loader will attempt to
286 // open the device before we return from DriverEntry
287 //
289 FxLibraryGlobals.LibraryDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
290 }
291
292 return status;
293}
294
295extern "C"
296VOID
298 VOID
299 )
300{
302}
303
304VOID
306 VOID
307 )
308{
312 }
313}
314
315extern "C"
317NTAPI
321 )
322{
326
327 //
328 // This creates a local buffer which is big enough to hold a copy of the
329 // constant string assigned to it. It does not point to the constant
330 // string. As such, it is a writeable buffer.
331 //
332 // NOTE: KMDF_DEVICE_NAME L"XXXX" creates a concatenated string of
333 // KMDF_DEVICE_NAME + L"XXXX". This is done to give us room for
334 // appending a number up to 4 digits long after KMDF_DEVICE_NAME if
335 // you want a null terminated string, 5 digits long if the string is
336 // not null terminated (as is the case for a UNICODE_STRING)
337 //
338 WCHAR buffer[] = KMDF_DEVICE_NAME L"XXXX";
339
340 //
341 // Initialize global to make NonPagedPool be treated as NxPool on Win8
342 // and NonPagedPool on down-level
343 //
344#ifndef __REACTOS__
345 ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
346#endif
348
349 //
350 // Determine if debug prints are on.
351 //
353
354 __Print(("DriverEntry\n"));
355
356 DriverObject->DriverUnload = DriverUnload;
357
359
363
364 RtlZeroMemory(&name, sizeof(name));
365 name.Buffer = buffer;
366 name.Length = 0x0;
367 name.MaximumLength = sizeof(buffer);
368
369 //
370 // We use the string when we declare the buffer to get the right sized
371 // buffer. Now we want to make sure there are no contents before we
372 // use it to create a device object.
373 //
374 RtlZeroMemory(buffer, sizeof(buffer));
375
377 if (!NT_SUCCESS(status)) {
378 __Print(("ERROR: FxLibraryCreateDevice failed with Status 0x%x\n", status));
379 return status;
380 }
381
382 //
383 // Register this library with WdfLdr
384 //
385 // NOTE: Once WdfRegisterLibrary returns NT_SUCCESS() we must return
386 // NT_SUCCESS from DriverEntry!
387 //
389 if (!NT_SUCCESS(status)) {
390 __Print(("ERROR: WdfRegisterLibrary failed with Status 0x%x\n", status));
392 return status;
393 }
394
395 //
396 // Write KMDF version to registry
397 //
399
400 return STATUS_SUCCESS;
401}
402
403//-----------------------------------------------------------------------------
404//
405//-----------------------------------------------------------------------------
406extern "C"
407VOID
408NTAPI
411 )
412{
413 __Print(("DriverUnload\n"));
414
415 //
416 // Delete KMDF version from registry before destroying the Driver Object
417 //
419
420 //
421 // Make sure everything is deleted. Since the driver is considered a legacy
422 // driver, it can be unloaded while there are still outstanding device objects.
423 //
425}
426
427//-----------------------------------------------------------------------------
428//
429//-----------------------------------------------------------------------------
430extern "C"
433NTAPI
435 VOID
436 )
437{
439}
440
441//-----------------------------------------------------------------------------
442//
443//-----------------------------------------------------------------------------
444extern "C"
447NTAPI
449 VOID
450 )
451{
453}
454
455#define EVTLOG_MESSAGE_SIZE 70
456#define RAW_DATA_SIZE 4
457
458extern "C"
461NTAPI
466 )
467{
470 WCHAR insertString[EVTLOG_MESSAGE_SIZE];
472 PCLIENT_INFO clientInfo = NULL;
473
475
476 clientInfo = (PCLIENT_INFO)*Context;
477 *Context = NULL;
478
479 ASSERT(Info->Version.Major == WdfLibraryInfo.Version.Major);
480
481 //
482 // NOTE: If the currently loaded library < drivers minor version fail the load
483 // instead of binding to a lower minor version. The reason for that if there
484 // is a newer API or new contract change made the driver shouldn't be using older
485 // API than it was compiled with.
486 //
487
488 if (Info->Version.Minor > WdfLibraryInfo.Version.Minor) {
489 status = RtlStringCchPrintfW(insertString,
490 RTL_NUMBER_OF(insertString),
491 L"Driver Version: %d.%d Kmdf Lib. Version: %d.%d",
492 Info->Version.Major,
493 Info->Version.Minor,
496 if (!NT_SUCCESS(status)) {
497 __Print(("ERROR: RtlStringCchPrintfW failed with Status 0x%x\n", status));
498 return status;
499 }
500 rawData[0] = Info->Version.Major;
501 rawData[1] = Info->Version.Minor;
504
508 insertString,
509 rawData,
510 sizeof(rawData) );
511 //
512 // this looks like the best status to return
513 //
515
516 }
517
520 clientInfo);
521
522 if (NT_SUCCESS(status)) {
523 //
524 // The context will be a pointer to FX_DRIVER_GLOBALS
525 //
527
528 //
529 // Set the WDF_BIND_INFO structure pointer in FxDriverGlobals
530 //
533 }
534
535 return status;
536}
537
538
539//-----------------------------------------------------------------------------
540//
541//-----------------------------------------------------------------------------
542extern "C"
545NTAPI
549 )
550{
552}
553
554VOID
558 )
559{
561 OBJECT_ATTRIBUTES objectAttributes;
562 HANDLE driverKey;
563 HANDLE parametersKey;
564 UNICODE_STRING valueName;
565 UNICODE_STRING parametersPath;
566 PDRV_EXTENSION driverExtension;
567
568 driverKey = NULL;
569 parametersKey = NULL;
570 driverExtension = NULL;
571
572 RtlInitUnicodeString(&parametersPath, DRIVER_PARAMETERS);
573
574 InitializeObjectAttributes(&objectAttributes,
577 NULL,
578 NULL);
579
580 status = ZwOpenKey(&driverKey, KEY_CREATE_SUB_KEY, &objectAttributes);
581 if (!NT_SUCCESS(status)) {
582 __Print(("WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\n",
583 RegistryPath->Buffer));
584 goto out;
585 }
586
587 InitializeObjectAttributes(&objectAttributes,
588 &parametersPath,
590 driverKey,
591 NULL);
592
593 //
594 // Open or create key and get a handle
595 //
596 status = ZwCreateKey(&parametersKey,
598 &objectAttributes,
599 0,
602 NULL);
603
604 if (!NT_SUCCESS(status)) {
605 __Print(("WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\\%S\n",
606 RegistryPath->Buffer, parametersPath.Buffer));
607 goto out;
608 }
609
610 //
611 // Set Major Version
612 //
614
615 status = ZwSetValueKey(parametersKey,
616 &valueName,
617 0,
618 REG_DWORD,
621
622 if (!NT_SUCCESS(status)) {
623 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Major Version\n"));
624 goto out;
625 }
626
627 //
628 // Set Minor Version
629 //
631
632 status = ZwSetValueKey(parametersKey,
633 &valueName,
634 0,
635 REG_DWORD,
638
639 if (!NT_SUCCESS(status)) {
640 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Minor Version\n"));
641 goto out;
642 }
643
644
645 //
646 // Set Build Number
647 //
649
650 status = ZwSetValueKey(parametersKey,
651 &valueName,
652 0,
653 REG_DWORD,
656
657 if (!NT_SUCCESS(status)) {
658 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Build Number\n"));
659 goto out;
660 }
661
662 //
663 // Create a Driver Extension to store the registry path, where we write the
664 // version of the wdf01000.sys that's loaded in memory
665 //
668 sizeof(DRV_EXTENSION),
669 (PVOID *)&driverExtension);
670
671 if (!NT_SUCCESS(status) || driverExtension == NULL) {
672 goto out;
673 }
674
676 PagedPool,
677 RegistryPath->MaximumLength,
678 FX_TAG);
679 if (driverExtension->ParametersRegistryPath.Buffer == NULL) {
680 goto out;
681 }
682
683 driverExtension->ParametersRegistryPath.MaximumLength = RegistryPath->MaximumLength;
685
686out:
687 if (driverKey != NULL) {
688 ZwClose(driverKey);
689 }
690
691 if (parametersKey != NULL) {
692 ZwClose(parametersKey);
693 }
694
695 return;
696}
697
698VOID
701 )
702{
704 OBJECT_ATTRIBUTES objectAttributes;
705 HANDLE driverKey;
706 HANDLE parametersKey;
707 UNICODE_STRING valueName;
709 UNICODE_STRING parametersPath;
710 PDRV_EXTENSION driverExtension;
711
712 RtlInitUnicodeString(&parametersPath, DRIVER_PARAMETERS);
713
714 driverKey = NULL;
715 parametersKey = NULL;
716
719
720 if (driverExtension == NULL || driverExtension->ParametersRegistryPath.Buffer == NULL) {
721 return;
722 }
723
724 registryPath = &driverExtension->ParametersRegistryPath;
725
726 InitializeObjectAttributes(&objectAttributes,
729 NULL,
730 NULL);
731
732 status = ZwOpenKey(&driverKey, KEY_SET_VALUE, &objectAttributes);
733 if (!NT_SUCCESS(status)) {
734 goto out;
735 }
736
737 InitializeObjectAttributes(&objectAttributes,
738 &parametersPath,
740 driverKey,
741 NULL);
742 //
743 // Open the key for deletion
744 //
745 status = ZwOpenKey(&parametersKey,
746 DELETE,
747 &objectAttributes);
748
749 if (!NT_SUCCESS(status)) {
750 goto out;
751 }
752
754 ZwDeleteValueKey(parametersKey, &valueName);
755
757 ZwDeleteValueKey(parametersKey, &valueName);
758
760 ZwDeleteValueKey(parametersKey, &valueName);
761
762 ZwDeleteKey(parametersKey);
763
764out:
765 if (driverExtension->ParametersRegistryPath.Buffer != NULL) {
766 ExFreePool(driverExtension->ParametersRegistryPath.Buffer);
767 }
768
769 if (driverKey != NULL) {
770 ZwClose(driverKey);
771 }
772
773 if (parametersKey != NULL) {
774 ZwClose(parametersKey);
775 }
776
777 return;
778}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
LONG NTSTATUS
Definition: precomp.h:26
LPCTSTR registryPath
Definition: butterflies.c:17
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_OBJECT_TYPE_MISMATCH
Definition: d3dkmdt.h:46
#define __in
Definition: dbghelp.h:35
#define __deref_out
Definition: dbghelp.h:26
#define __inout
Definition: dbghelp.h:50
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define L(x)
Definition: resources.c:13
#define __drv_dispatchType(x)
Definition: driverspecs.h:267
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define PagedPool
Definition: env_spec_w32.h:308
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
#define WDF_LIBRARY_COMMISSION
Definition: fxldr.h:110
_Must_inspect_result_ NTSTATUS(NTAPI * PFNLIBRARYUNREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __in PWDF_COMPONENT_GLOBALS DriverGlobals)
Definition: fxldr.h:78
struct _WDF_LIBRARY_INFO WDF_LIBRARY_INFO
#define WDF_LIBRARY_UNREGISTER_CLIENT
Definition: fxldr.h:113
#define WDF_REGISTRY_DBGPRINT_ON
Definition: fxldr.h:115
_Must_inspect_result_ NTSTATUS(NTAPI * PFNLIBRARYDECOMMISSION)(VOID)
Definition: fxldr.h:62
#define WDF_LIBRARY_DECOMMISSION
Definition: fxldr.h:111
#define WDF_LIBRARY_REGISTER_CLIENT
Definition: fxldr.h:112
struct _CLIENT_INFO * PCLIENT_INFO
_Must_inspect_result_ NTSTATUS(NTAPI * PFNLIBRARYCOMMISSION)(VOID)
Definition: fxldr.h:55
_Must_inspect_result_ NTSTATUS(NTAPI * PFNLIBRARYREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __deref_out PWDF_COMPONENT_GLOBALS *ComponentGlobals, __deref_inout PVOID *Context)
Definition: fxldr.h:69
#define FX_TAG
Definition: fxmacros.hpp:155
NTSYSAPI NTSTATUS NTAPI ZwDeleteValueKey(__in IN HANDLE Key, __in IN PUNICODE_STRING ValueName)
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
_Must_inspect_result_ NTSTATUS NTAPI FxLibraryCommonCommission(VOID)
_Must_inspect_result_ NTSTATUS NTAPI FxLibraryCommonRegisterClient(__inout PWDF_BIND_INFO Info, __deref_out PWDF_DRIVER_GLOBALS *WdfDriverGlobals, __in_opt PCLIENT_INFO ClientInfo)
#define __Print(_x_)
VOID LibraryLogEvent(__in PDRIVER_OBJECT DriverObject, __in NTSTATUS ErrorCode, __in NTSTATUS FinalStatus, __in PWSTR ErrorInsertionString, __in_bcount(RawDataLen) PVOID RawDataBuf, __in USHORT RawDataLen)
_Must_inspect_result_ NTSTATUS NTAPI FxLibraryCommonUnregisterClient(__in PWDF_BIND_INFO Info, __in PWDF_DRIVER_GLOBALS WdfDriverGlobals)
#define LITERAL(a)
_Must_inspect_result_ NTSTATUS NTAPI FxLibraryCommonDecommission(VOID)
#define ASSERT(a)
Definition: mode.c:44
char string[160]
Definition: util.h:11
static unsigned char rawData[2356]
Definition: data.c:573
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define KernelMode
Definition: asm.h:38
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
DRIVER_DISPATCH(nfs41_FsdDispatch)
#define _Must_inspect_result_
Definition: no_sal2.h:62
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define KEY_CREATE_SUB_KEY
Definition: nt_native.h:1021
#define DELETE
Definition: nt_native.h:57
#define REG_OPTION_VOLATILE
Definition: nt_native.h:1063
#define KEY_SET_VALUE
Definition: nt_native.h:1020
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1916
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1838
#define IoCompleteRequest
Definition: irp.c:1240
NTSTRSAFEVAPI RtlUnicodeStringPrintf(_In_ PUNICODE_STRING DestinationString, _In_ NTSTRSAFE_PCWSTR pszFormat,...)
Definition: ntstrsafe.h:3241
NTSTRSAFEVAPI RtlStringCchPrintfW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
Definition: ntstrsafe.h:1110
#define FILE_DEVICE_UNKNOWN
Definition: winioctl.h:79
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define WDFVER_MINOR_VERSION_NOT_SUPPORTED
#define __deref_inout
Definition: sal_old.h:120
#define REG_DWORD
Definition: sdbapi.c:615
struct _DRV_EXTENSION * PDRV_EXTENSION
#define DRIVER_PARAMETERS
Definition: version.cpp:38
#define KMDF_DEVICE_NAME
Definition: version.cpp:246
FX_OBJECT_INFO * typeFX_OBJECT_INFO
Definition: version.cpp:66
NTSTATUS NTAPI FxLibraryDispatch(__in struct _DEVICE_OBJECT *DeviceObject, __in PIRP Irp)
Definition: version.cpp:203
WDF_BIND_INFO * typeWDF_BIND_INFO
Definition: version.cpp:61
WDF_OBJECT_CONTEXT_TYPE_INFO * typeWDF_OBJECT_CONTEXT_TYPE_INFO
Definition: version.cpp:62
WDF_IFR_OFFSET * typeWDF_IFR_OFFSET
Definition: version.cpp:60
#define REGISTRY_KMDF_BUILD_NUMBER
Definition: version.cpp:41
VOID FxLibraryDeleteDevice(VOID)
Definition: version.cpp:297
FX_POOL * typeFX_POOL
Definition: version.cpp:68
#define RAW_DATA_SIZE
Definition: version.cpp:456
VOID FxLibraryCleanup(VOID)
Definition: version.cpp:305
FX_DUMP_DRIVER_INFO_ENTRY * typeFX_DUMP_DRIVER_INFO_ENTRY
Definition: version.cpp:71
union @5041 uAllPublicTypes
DRIVER_INITIALIZE DriverEntry
Definition: version.cpp:103
VOID WdfDeleteKmdfVersionFromRegistry(__in PDRIVER_OBJECT DriverObject)
Definition: version.cpp:699
WDF_BUGCHECK_CODES * typeWDF_BUGCHECK_CODES
Definition: version.cpp:64
struct _DRV_EXTENSION DRV_EXTENSION
#define REGISTRY_KMDF_MAJOR_VERSION
Definition: version.cpp:39
FX_POOL_HEADER * typeFX_POOL_HEADER
Definition: version.cpp:67
#define REGISTRY_KMDF_MINOR_VERSION
Definition: version.cpp:40
WDF_IFR_RECORD * typeWDF_IFR_RECORD
Definition: version.cpp:59
FxTargetSubmitSyncParams * typeFxTargetSubmitSyncParams
Definition: version.cpp:72
ULONG WdfLdrDbgPrintOn
Definition: version.cpp:113
VOID WdfWriteKmdfVersionToRegistry(__in PDRIVER_OBJECT DriverObject, __in PUNICODE_STRING RegistryPath)
Definition: version.cpp:555
RTL_OSVERSIONINFOW gOsVersion
Definition: version.cpp:111
PCHAR WdfLdrType
Definition: version.cpp:115
WDF_IFR_HEADER * typeWDF_IFR_HEADER
Definition: version.cpp:58
#define EVTLOG_MESSAGE_SIZE
Definition: version.cpp:455
WDF_REQUEST_FATAL_ERROR_CODES * typeWDF_REQUEST_FATAL_ERROR_CODES
Definition: version.cpp:65
WDF_LIBRARY_INFO WdfLibraryInfo
Definition: version.cpp:189
FxContextHeader * typeFxContextHeader
Definition: version.cpp:70
_Must_inspect_result_ NTSTATUS FxLibraryCreateDevice(__in PUNICODE_STRING DeviceName)
Definition: version.cpp:250
DRIVER_UNLOAD DriverUnload
Definition: version.cpp:100
WDF_POWER_ROUTINE_TIMED_OUT_DATA * typeWDF_POWER_ROUTINE_TIMED_OUT_DATA
Definition: version.cpp:63
#define DRIVER_OBJECT_EXTENSION_IDENTIFIER
Definition: version.cpp:37
#define KMDF_DEFAULT_NAME
Definition: version.cpp:91
FxObject * typeFxObject
Definition: version.cpp:69
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: fxpool.h:63
PDEVICE_OBJECT LibraryDeviceObject
Definition: fxglobals.h:728
PDRIVER_OBJECT DriverObject
Definition: fxglobals.h:719
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2291
UNICODE_STRING ParametersRegistryPath
Definition: version.cpp:181
PWDF_BIND_INFO WdfBindInfo
Definition: fxglobals.h:405
Definition: fxbugcheck.h:81
USHORT MaximumLength
Definition: env_spec_w32.h:370
WDF_VERSION Version
Definition: fxldr.h:145
WDF_MAJOR_VERSION Major
Definition: fxldr.h:122
WDF_BUILD_NUMBER Build
Definition: fxldr.h:124
WDF_MINOR_VERSION Minor
Definition: fxldr.h:123
Definition: name.c:39
Definition: ps.c:97
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_OBJECT_NAME_COLLISION
Definition: udferr_usr.h:150
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
enum _WDF_REQUEST_FATAL_ERROR_CODES WDF_REQUEST_FATAL_ERROR_CODES
WDF_EXTERN_C_START enum _WDF_BUGCHECK_CODES WDF_BUGCHECK_CODES
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1703
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3281
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
PWDF_DRIVER_GLOBALS WdfDriverGlobals
NTSTATUS NTAPI WdfRegisterLibrary(_In_ PWDF_LIBRARY_INFO LibraryInfo, _In_ PUNICODE_STRING ServicePath, _In_ PCUNICODE_STRING LibraryDeviceName)
Register wdf01000 library.
Definition: wdfldr.c:311
NTSTATUS NTAPI WdfLdrDiagnosticsValueByNameAsULONG(_In_ PUNICODE_STRING ValueName, _Out_ PULONG Value)
Retrieves an ULONG value from KMDF diagnostics registry key.
Definition: wdfldr.c:54
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MJ_CLEANUP
struct _OSVERSIONINFOW RTL_OSVERSIONINFOW
__wchar_t WCHAR
Definition: xmlstorage.h:180