ReactOS 0.4.16-dev-329-g9223134
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
36#define DRIVER_OBJECT_EXTENSION_IDENTIFIER DriverEntry
37#define DRIVER_PARAMETERS L"Parameters"
38#define REGISTRY_KMDF_MAJOR_VERSION L"MajorVersion"
39#define REGISTRY_KMDF_MINOR_VERSION L"MinorVersion"
40#define REGISTRY_KMDF_BUILD_NUMBER L"BuildNumber"
41
42//-----------------------------------------------------------------------------
43// These header files are referenced in order to make internal structures
44// available in public symbols. Various WDFKD debug commands use these
45// internal structures to provide information about WDF.
46//-----------------------------------------------------------------------------
47#include "fxifr.h"
48
49extern "C" {
50
51//
52// This is the collection of all structure/types to be make public.
53// This union forces the structure type-info into the PDB file.
54//
55union {
56
72
74
75} // extern "C" end
76
77//----------------------------------------- ------------------------------------
78
79extern "C" {
80
81#include "fxdynamics.h"
82
83#include "fxlibrarycommon.h"
84
85#define KMDF_DEFAULT_NAME "Wdf" ## \
86 LITERAL(__WDF_MAJOR_VERSION_STRING) ## \
87 "000" //minor version
88
89//-----------------------------------------------------------------------------
90// local prototype definitions
91//-----------------------------------------------------------------------------
92extern "C"
93DRIVER_UNLOAD DriverUnload;
94
95extern "C"
96DRIVER_INITIALIZE DriverEntry;
97
98extern "C"
103
105
107
109
110} // extern "C"
111
112
113//-----------------------------------------------------------------------------
114//
115//-----------------------------------------------------------------------------
116extern "C"
120 VOID
121 );
122
123extern "C"
127 VOID
128 );
129
130extern "C"
137 );
138
139extern "C"
145 );
146
147extern "C"
148VOID
150 VOID
151 );
152
153VOID
155 VOID
156 );
157
158VOID
162 );
163
164VOID
167 );
168
169typedef struct _DRV_EXTENSION {
172
173//-----------------------------------------------------------------------------
174// Library registeration information
175//-----------------------------------------------------------------------------
176extern "C" {
177#pragma prefast(suppress:__WARNING_ENCODE_MEMBER_FUNCTION_POINTER, "kernel component.");
179 sizeof(WDF_LIBRARY_INFO),
184 { __WDF_MAJOR_VERSION, __WDF_MINOR_VERSION, __WDF_BUILD_NUMBER }
185};
186
187} // extern "C" end
188
189extern "C"
194 )
195{
197
200
202
204 case IRP_MJ_CREATE:
205 //
206 // To limit our exposure for this device object, only allow kernel mode
207 // creates.
208 //
209 if (Irp->RequestorMode == KernelMode) {
211 }
212 break;
213
214 case IRP_MJ_CLEANUP:
215 case IRP_MJ_CLOSE:
216 //
217 // Since we allowed a create to succeed, succeed the cleanup and close
218 //
220 break;
221 }
222
223 Irp->IoStatus.Status = status;
224 Irp->IoStatus.Information = 0x0;
226
227 return status;
228}
229
230//-----------------------------------------------------------------------------
231//
232//-----------------------------------------------------------------------------
233
234#define KMDF_DEVICE_NAME L"\\Device\\KMDF"
235
240 )
241{
243 ULONG i;
244
245 i = 0;
246
247 //
248 // Repeatedly try to create a named device object until we run out of buffer
249 // space or we succeed.
250 //
251 do {
253 if (!NT_SUCCESS(status)) {
254 return status;
255 }
256
257 //
258 // Create a device with no device extension
259 //
262 0,
265 0,
266 FALSE,
268 );
270
271 if (NT_SUCCESS(status)) {
272 //
273 // Clear the initializing bit now because the loader will attempt to
274 // open the device before we return from DriverEntry
275 //
277 FxLibraryGlobals.LibraryDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
278 }
279
280 return status;
281}
282
283extern "C"
284VOID
286 VOID
287 )
288{
290}
291
292VOID
294 VOID
295 )
296{
300 }
301}
302
303extern "C"
308 )
309{
313
314 //
315 // This creates a local buffer which is big enough to hold a copy of the
316 // constant string assigned to it. It does not point to the constant
317 // string. As such, it is a writeable buffer.
318 //
319 // NOTE: KMDF_DEVICE_NAME L"XXXX" creates a concatenated string of
320 // KMDF_DEVICE_NAME + L"XXXX". This is done to give us room for
321 // appending a number up to 4 digits long after KMDF_DEVICE_NAME if
322 // you want a null terminated string, 5 digits long if the string is
323 // not null terminated (as is the case for a UNICODE_STRING)
324 //
325 WCHAR buffer[] = KMDF_DEVICE_NAME L"XXXX";
326
327 //
328 // Initialize global to make NonPagedPool be treated as NxPool on Win8
329 // and NonPagedPool on down-level
330 //
331 ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
332
334
335 //
336 // Determine if debug prints are on.
337 //
338 (void) WdfLdrDiagnosticsValueByNameAsULONG(&string, &WdfLdrDbgPrintOn);
339
340 __Print(("DriverEntry\n"));
341
342 DriverObject->DriverUnload = DriverUnload;
343
345
349
350 RtlZeroMemory(&name, sizeof(name));
351 name.Buffer = buffer;
352 name.Length = 0x0;
353 name.MaximumLength = sizeof(buffer);
354
355 //
356 // We use the string when we declare the buffer to get the right sized
357 // buffer. Now we want to make sure there are no contents before we
358 // use it to create a device object.
359 //
360 RtlZeroMemory(buffer, sizeof(buffer));
361
363 if (!NT_SUCCESS(status)) {
364 __Print(("ERROR: FxLibraryCreateDevice failed with Status 0x%x\n", status));
365 return status;
366 }
367
368 //
369 // Register this library with WdfLdr
370 //
371 // NOTE: Once WdfRegisterLibrary returns NT_SUCCESS() we must return
372 // NT_SUCCESS from DriverEntry!
373 //
375 if (!NT_SUCCESS(status)) {
376 __Print(("ERROR: WdfRegisterLibrary failed with Status 0x%x\n", status));
378 return status;
379 }
380
381 //
382 // Write KMDF version to registry
383 //
385
386 return STATUS_SUCCESS;
387}
388
389//-----------------------------------------------------------------------------
390//
391//-----------------------------------------------------------------------------
392extern "C"
393VOID
396 )
397{
398 __Print(("DriverUnload\n"));
399
400 //
401 // Delete KMDF version from registry before destroying the Driver Object
402 //
404
405 //
406 // Make sure everything is deleted. Since the driver is considered a legacy
407 // driver, it can be unloaded while there are still outstanding device objects.
408 //
410}
411
412//-----------------------------------------------------------------------------
413//
414//-----------------------------------------------------------------------------
415extern "C"
419 VOID
420 )
421{
423}
424
425//-----------------------------------------------------------------------------
426//
427//-----------------------------------------------------------------------------
428extern "C"
432 VOID
433 )
434{
436}
437
438#define EVTLOG_MESSAGE_SIZE 70
439#define RAW_DATA_SIZE 4
440
441extern "C"
448 )
449{
452 WCHAR insertString[EVTLOG_MESSAGE_SIZE];
454 PCLIENT_INFO clientInfo = NULL;
455
457
458 clientInfo = (PCLIENT_INFO)*Context;
459 *Context = NULL;
460
461 ASSERT(Info->Version.Major == WdfLibraryInfo.Version.Major);
462
463 //
464 // NOTE: If the currently loaded library < drivers minor version fail the load
465 // instead of binding to a lower minor version. The reason for that if there
466 // is a newer API or new contract change made the driver shouldn't be using older
467 // API than it was compiled with.
468 //
469
470 if (Info->Version.Minor > WdfLibraryInfo.Version.Minor) {
471 status = RtlStringCchPrintfW(insertString,
472 RTL_NUMBER_OF(insertString),
473 L"Driver Version: %d.%d Kmdf Lib. Version: %d.%d",
474 Info->Version.Major,
475 Info->Version.Minor,
478 if (!NT_SUCCESS(status)) {
479 __Print(("ERROR: RtlStringCchPrintfW failed with Status 0x%x\n", status));
480 return status;
481 }
482 rawData[0] = Info->Version.Major;
483 rawData[1] = Info->Version.Minor;
486
488 WDFVER_MINOR_VERSION_NOT_SUPPORTED,
490 insertString,
491 rawData,
492 sizeof(rawData) );
493 //
494 // this looks like the best status to return
495 //
497
498 }
499
502 clientInfo);
503
504 if (NT_SUCCESS(status)) {
505 //
506 // The context will be a pointer to FX_DRIVER_GLOBALS
507 //
509
510 //
511 // Set the WDF_BIND_INFO structure pointer in FxDriverGlobals
512 //
515 }
516
517 return status;
518}
519
520
521//-----------------------------------------------------------------------------
522//
523//-----------------------------------------------------------------------------
524extern "C"
530 )
531{
533}
534
535VOID
539 )
540{
542 OBJECT_ATTRIBUTES objectAttributes;
543 HANDLE driverKey;
544 HANDLE parametersKey;
545 UNICODE_STRING valueName;
546 UNICODE_STRING parametersPath;
547 PDRV_EXTENSION driverExtension;
548
549 driverKey = NULL;
550 parametersKey = NULL;
551 driverExtension = NULL;
552
553 RtlInitUnicodeString(&parametersPath, DRIVER_PARAMETERS);
554
555 InitializeObjectAttributes(&objectAttributes,
558 NULL,
559 NULL);
560
561 status = ZwOpenKey(&driverKey, KEY_CREATE_SUB_KEY, &objectAttributes);
562 if (!NT_SUCCESS(status)) {
563 __Print(("WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\n",
564 RegistryPath->Buffer));
565 goto out;
566 }
567
568 InitializeObjectAttributes(&objectAttributes,
569 &parametersPath,
571 driverKey,
572 NULL);
573
574 //
575 // Open or create key and get a handle
576 //
577 status = ZwCreateKey(&parametersKey,
579 &objectAttributes,
580 0,
583 NULL);
584
585 if (!NT_SUCCESS(status)) {
586 __Print(("WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\\%S\n",
587 RegistryPath->Buffer, parametersPath.Buffer));
588 goto out;
589 }
590
591 //
592 // Set Major Version
593 //
595
596 status = ZwSetValueKey(parametersKey,
597 &valueName,
598 0,
599 REG_DWORD,
602
603 if (!NT_SUCCESS(status)) {
604 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Major Version\n"));
605 goto out;
606 }
607
608 //
609 // Set Minor Version
610 //
612
613 status = ZwSetValueKey(parametersKey,
614 &valueName,
615 0,
616 REG_DWORD,
619
620 if (!NT_SUCCESS(status)) {
621 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Minor Version\n"));
622 goto out;
623 }
624
625
626 //
627 // Set Build Number
628 //
630
631 status = ZwSetValueKey(parametersKey,
632 &valueName,
633 0,
634 REG_DWORD,
637
638 if (!NT_SUCCESS(status)) {
639 __Print(("WdfWriteKmdfVersionToRegistry: Failed to set Build Number\n"));
640 goto out;
641 }
642
643 //
644 // Create a Driver Extension to store the registry path, where we write the
645 // version of the wdf01000.sys that's loaded in memory
646 //
649 sizeof(DRV_EXTENSION),
650 (PVOID *)&driverExtension);
651
652 if (!NT_SUCCESS(status) || driverExtension == NULL) {
653 goto out;
654 }
655
657 PagedPool,
658 RegistryPath->MaximumLength,
659 FX_TAG);
660 if (driverExtension->ParametersRegistryPath.Buffer == NULL) {
661 goto out;
662 }
663
664 driverExtension->ParametersRegistryPath.MaximumLength = RegistryPath->MaximumLength;
666
667out:
668 if (driverKey != NULL) {
669 ZwClose(driverKey);
670 }
671
672 if (parametersKey != NULL) {
673 ZwClose(parametersKey);
674 }
675
676 return;
677}
678
679VOID
682 )
683{
685 OBJECT_ATTRIBUTES objectAttributes;
686 HANDLE driverKey;
687 HANDLE parametersKey;
688 UNICODE_STRING valueName;
690 UNICODE_STRING parametersPath;
691 PDRV_EXTENSION driverExtension;
692
693 RtlInitUnicodeString(&parametersPath, DRIVER_PARAMETERS);
694
695 driverKey = NULL;
696 parametersKey = NULL;
697
700
701 if (driverExtension == NULL || driverExtension->ParametersRegistryPath.Buffer == NULL) {
702 return;
703 }
704
705 registryPath = &driverExtension->ParametersRegistryPath;
706
707 InitializeObjectAttributes(&objectAttributes,
710 NULL,
711 NULL);
712
713 status = ZwOpenKey(&driverKey, KEY_SET_VALUE, &objectAttributes);
714 if (!NT_SUCCESS(status)) {
715 goto out;
716 }
717
718 InitializeObjectAttributes(&objectAttributes,
719 &parametersPath,
721 driverKey,
722 NULL);
723 //
724 // Open the key for deletion
725 //
726 status = ZwOpenKey(&parametersKey,
727 DELETE,
728 &objectAttributes);
729
730 if (!NT_SUCCESS(status)) {
731 goto out;
732 }
733
735 ZwDeleteValueKey(parametersKey, &valueName);
736
738 ZwDeleteValueKey(parametersKey, &valueName);
739
741 ZwDeleteValueKey(parametersKey, &valueName);
742
743 ZwDeleteKey(parametersKey);
744
745out:
746 if (driverExtension->ParametersRegistryPath.Buffer != NULL) {
747 ExFreePool(driverExtension->ParametersRegistryPath.Buffer);
748 }
749
750 if (driverKey != NULL) {
751 ZwClose(driverKey);
752 }
753
754 if (parametersKey != NULL) {
755 ZwClose(parametersKey);
756 }
757
758 return;
759}
760
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 __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
#define WDF_LIBRARY_COMMISSION
Definition: fxldr.h:110
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __deref_out PWDF_COMPONENT_GLOBALS *ComponentGlobals, __deref_inout PVOID *Context)
Definition: fxldr.h:69
_Must_inspect_result_ NTSTATUS WdfRegisterLibrary(__in PWDF_LIBRARY_INFO LibraryInfo, __in PUNICODE_STRING ServicePath, __in PCUNICODE_STRING LibraryDeviceName)
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
#define WDF_LIBRARY_DECOMMISSION
Definition: fxldr.h:111
#define WDF_LIBRARY_REGISTER_CLIENT
Definition: fxldr.h:112
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYCOMMISSION)(VOID)
Definition: fxldr.h:55
struct _CLIENT_INFO * PCLIENT_INFO
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYDECOMMISSION)(VOID)
Definition: fxldr.h:62
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYUNREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __in PWDF_COMPONENT_GLOBALS DriverGlobals)
Definition: fxldr.h:78
#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 FxLibraryCommonRegisterClient(__inout PWDF_BIND_INFO Info, __deref_out PWDF_DRIVER_GLOBALS *WdfDriverGlobals, __in_opt PCLIENT_INFO ClientInfo)
_Must_inspect_result_ NTSTATUS FxLibraryCommonDecommission(VOID)
#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 FxLibraryCommonCommission(VOID)
#define LITERAL(a)
_Must_inspect_result_ NTSTATUS FxLibraryCommonUnregisterClient(__in PWDF_BIND_INFO Info, __in PWDF_DRIVER_GLOBALS WdfDriverGlobals)
#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:34
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:1018
#define DELETE
Definition: nt_native.h:57
#define REG_OPTION_VOLATILE
Definition: nt_native.h:1060
#define KEY_SET_VALUE
Definition: nt_native.h:1017
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
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:1904
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1826
#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 L(x)
Definition: ntvdm.h:50
#define FILE_DEVICE_UNKNOWN
Definition: winioctl.h:79
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
static FILE * out
Definition: regtests2xml.c:44
#define __deref_inout
Definition: sal_old.h:120
#define REG_DWORD
Definition: sdbapi.c:596
struct _DRV_EXTENSION * PDRV_EXTENSION
#define DRIVER_PARAMETERS
Definition: version.cpp:37
#define KMDF_DEVICE_NAME
Definition: version.cpp:234
FX_OBJECT_INFO * typeFX_OBJECT_INFO
Definition: version.cpp:65
WDF_BIND_INFO * typeWDF_BIND_INFO
Definition: version.cpp:60
WDF_OBJECT_CONTEXT_TYPE_INFO * typeWDF_OBJECT_CONTEXT_TYPE_INFO
Definition: version.cpp:61
WDF_IFR_OFFSET * typeWDF_IFR_OFFSET
Definition: version.cpp:59
#define REGISTRY_KMDF_BUILD_NUMBER
Definition: version.cpp:40
VOID FxLibraryDeleteDevice(VOID)
Definition: version.cpp:285
FX_POOL * typeFX_POOL
Definition: version.cpp:67
#define RAW_DATA_SIZE
Definition: version.cpp:439
VOID FxLibraryCleanup(VOID)
Definition: version.cpp:293
FX_DUMP_DRIVER_INFO_ENTRY * typeFX_DUMP_DRIVER_INFO_ENTRY
Definition: version.cpp:70
DRIVER_INITIALIZE DriverEntry
Definition: version.cpp:96
VOID WdfDeleteKmdfVersionFromRegistry(__in PDRIVER_OBJECT DriverObject)
Definition: version.cpp:680
WDF_BUGCHECK_CODES * typeWDF_BUGCHECK_CODES
Definition: version.cpp:63
struct _DRV_EXTENSION DRV_EXTENSION
#define REGISTRY_KMDF_MAJOR_VERSION
Definition: version.cpp:38
FX_POOL_HEADER * typeFX_POOL_HEADER
Definition: version.cpp:66
#define REGISTRY_KMDF_MINOR_VERSION
Definition: version.cpp:39
WDF_IFR_RECORD * typeWDF_IFR_RECORD
Definition: version.cpp:58
NTSTATUS FxLibraryDispatch(__in struct _DEVICE_OBJECT *DeviceObject, __in PIRP Irp)
Definition: version.cpp:191
FxTargetSubmitSyncParams * typeFxTargetSubmitSyncParams
Definition: version.cpp:71
ULONG WdfLdrDbgPrintOn
Definition: version.cpp:106
union @4750 uAllPublicTypes
VOID WdfWriteKmdfVersionToRegistry(__in PDRIVER_OBJECT DriverObject, __in PUNICODE_STRING RegistryPath)
Definition: version.cpp:536
RTL_OSVERSIONINFOW gOsVersion
Definition: version.cpp:104
PCHAR WdfLdrType
Definition: version.cpp:108
WDF_IFR_HEADER * typeWDF_IFR_HEADER
Definition: version.cpp:57
#define EVTLOG_MESSAGE_SIZE
Definition: version.cpp:438
WDF_REQUEST_FATAL_ERROR_CODES * typeWDF_REQUEST_FATAL_ERROR_CODES
Definition: version.cpp:64
WDF_LIBRARY_INFO WdfLibraryInfo
Definition: version.cpp:178
FxContextHeader * typeFxContextHeader
Definition: version.cpp:69
_Must_inspect_result_ NTSTATUS FxLibraryCreateDevice(__in PUNICODE_STRING DeviceName)
Definition: version.cpp:238
DRIVER_UNLOAD DriverUnload
Definition: version.cpp:93
WDF_POWER_ROUTINE_TIMED_OUT_DATA * typeWDF_POWER_ROUTINE_TIMED_OUT_DATA
Definition: version.cpp:62
#define DRIVER_OBJECT_EXTENSION_IDENTIFIER
Definition: version.cpp:36
#define KMDF_DEFAULT_NAME
Definition: version.cpp:85
FxObject * typeFxObject
Definition: version.cpp:68
#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:2289
UNICODE_STRING ParametersRegistryPath
Definition: version.cpp:170
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 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
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:2055
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_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
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MJ_CLEANUP
struct _OSVERSIONINFOW RTL_OSVERSIONINFOW
__wchar_t WCHAR
Definition: xmlstorage.h:180