28#define FX_DYNAMICS_GENERATE_TABLE 1
34#include "wdfversionlog.h"
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"
81#include "fxdynamics.h"
83#include "fxlibrarycommon.h"
85#define KMDF_DEFAULT_NAME "Wdf" ## \
86 LITERAL(__WDF_MAJOR_VERSION_STRING) ## \
177#pragma prefast(suppress:__WARNING_ENCODE_MEMBER_FUNCTION_POINTER, "kernel component.");
184 { __WDF_MAJOR_VERSION, __WDF_MINOR_VERSION, __WDF_BUILD_NUMBER }
224 Irp->IoStatus.Information = 0x0;
234#define KMDF_DEVICE_NAME L"\\Device\\KMDF"
331 ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
364 __Print((
"ERROR: FxLibraryCreateDevice failed with Status 0x%x\n",
status));
376 __Print((
"ERROR: WdfRegisterLibrary failed with Status 0x%x\n",
status));
438#define EVTLOG_MESSAGE_SIZE 70
439#define RAW_DATA_SIZE 4
473 L"Driver Version: %d.%d Kmdf Lib. Version: %d.%d",
479 __Print((
"ERROR: RtlStringCchPrintfW failed with Status 0x%x\n",
status));
488 WDFVER_MINOR_VERSION_NOT_SUPPORTED,
550 parametersKey =
NULL;
551 driverExtension =
NULL;
563 __Print((
"WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\n",
577 status = ZwCreateKey(¶metersKey,
586 __Print((
"WdfWriteKmdfVersionToRegistry: Failed to open HKLM\\%S\\%S\n",
596 status = ZwSetValueKey(parametersKey,
604 __Print((
"WdfWriteKmdfVersionToRegistry: Failed to set Major Version\n"));
613 status = ZwSetValueKey(parametersKey,
621 __Print((
"WdfWriteKmdfVersionToRegistry: Failed to set Minor Version\n"));
631 status = ZwSetValueKey(parametersKey,
639 __Print((
"WdfWriteKmdfVersionToRegistry: Failed to set Build Number\n"));
650 (
PVOID *)&driverExtension);
668 if (driverKey !=
NULL) {
672 if (parametersKey !=
NULL) {
696 parametersKey =
NULL;
726 status = ZwOpenKey(¶metersKey,
743 ZwDeleteKey(parametersKey);
750 if (driverKey !=
NULL) {
754 if (parametersKey !=
NULL) {
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define STATUS_OBJECT_TYPE_MISMATCH
#define NT_SUCCESS(StatCode)
#define __drv_dispatchType(x)
#define ExAllocatePoolWithTag(hernya, size, tag)
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
#define WDF_LIBRARY_COMMISSION
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __deref_out PWDF_COMPONENT_GLOBALS *ComponentGlobals, __deref_inout PVOID *Context)
_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
#define WDF_REGISTRY_DBGPRINT_ON
#define WDF_LIBRARY_DECOMMISSION
#define WDF_LIBRARY_REGISTER_CLIENT
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYCOMMISSION)(VOID)
struct _CLIENT_INFO * PCLIENT_INFO
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYDECOMMISSION)(VOID)
_Must_inspect_result_ NTSTATUS(* PFNLIBRARYUNREGISTERCLIENT)(__in PWDF_BIND_INFO Info, __in PWDF_COMPONENT_GLOBALS DriverGlobals)
NTSYSAPI NTSTATUS NTAPI ZwDeleteValueKey(__in IN HANDLE Key, __in IN PUNICODE_STRING ValueName)
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
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
_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)
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)
_Must_inspect_result_ NTSTATUS FxLibraryCommonUnregisterClient(__in PWDF_BIND_INFO Info, __in PWDF_DRIVER_GLOBALS WdfDriverGlobals)
static unsigned char rawData[2356]
#define InitializeObjectAttributes(p, n, a, r, s)
#define _Must_inspect_result_
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
DRIVER_DISPATCH(nfs41_FsdDispatch)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_VOLATILE
#define UNREFERENCED_PARAMETER(P)
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)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
#define IoCompleteRequest
NTSTRSAFEVAPI RtlUnicodeStringPrintf(_In_ PUNICODE_STRING DestinationString, _In_ NTSTRSAFE_PCWSTR pszFormat,...)
NTSTRSAFEVAPI RtlStringCchPrintfW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
#define FILE_DEVICE_UNKNOWN
FxLibraryGlobalsType FxLibraryGlobals
struct _DRV_EXTENSION * PDRV_EXTENSION
#define DRIVER_PARAMETERS
FX_OBJECT_INFO * typeFX_OBJECT_INFO
WDF_BIND_INFO * typeWDF_BIND_INFO
WDF_OBJECT_CONTEXT_TYPE_INFO * typeWDF_OBJECT_CONTEXT_TYPE_INFO
WDF_IFR_OFFSET * typeWDF_IFR_OFFSET
#define REGISTRY_KMDF_BUILD_NUMBER
VOID FxLibraryDeleteDevice(VOID)
VOID FxLibraryCleanup(VOID)
FX_DUMP_DRIVER_INFO_ENTRY * typeFX_DUMP_DRIVER_INFO_ENTRY
DRIVER_INITIALIZE DriverEntry
VOID WdfDeleteKmdfVersionFromRegistry(__in PDRIVER_OBJECT DriverObject)
WDF_BUGCHECK_CODES * typeWDF_BUGCHECK_CODES
union @4746 uAllPublicTypes
struct _DRV_EXTENSION DRV_EXTENSION
#define REGISTRY_KMDF_MAJOR_VERSION
FX_POOL_HEADER * typeFX_POOL_HEADER
#define REGISTRY_KMDF_MINOR_VERSION
WDF_IFR_RECORD * typeWDF_IFR_RECORD
NTSTATUS FxLibraryDispatch(__in struct _DEVICE_OBJECT *DeviceObject, __in PIRP Irp)
FxTargetSubmitSyncParams * typeFxTargetSubmitSyncParams
VOID WdfWriteKmdfVersionToRegistry(__in PDRIVER_OBJECT DriverObject, __in PUNICODE_STRING RegistryPath)
RTL_OSVERSIONINFOW gOsVersion
WDF_IFR_HEADER * typeWDF_IFR_HEADER
#define EVTLOG_MESSAGE_SIZE
WDF_REQUEST_FATAL_ERROR_CODES * typeWDF_REQUEST_FATAL_ERROR_CODES
WDF_LIBRARY_INFO WdfLibraryInfo
FxContextHeader * typeFxContextHeader
_Must_inspect_result_ NTSTATUS FxLibraryCreateDevice(__in PUNICODE_STRING DeviceName)
DRIVER_UNLOAD DriverUnload
WDF_POWER_ROUTINE_TIMED_OUT_DATA * typeWDF_POWER_ROUTINE_TIMED_OUT_DATA
#define DRIVER_OBJECT_EXTENSION_IDENTIFIER
#define KMDF_DEFAULT_NAME
PDEVICE_OBJECT LibraryDeviceObject
PDRIVER_OBJECT DriverObject
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
UNICODE_STRING ParametersRegistryPath
PWDF_BIND_INFO WdfBindInfo
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
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
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
PWDF_DRIVER_GLOBALS WdfDriverGlobals
struct _OSVERSIONINFOW RTL_OSVERSIONINFOW