33#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
39#if defined(__cplusplus)
45#define FX_TELEMETRY_ENABLED(TraceHandle, Globals) \
46 (TraceHandle && IsDriverTelemetryContextInitialized(Globals)) \
48#define WDF_CENSUS_EVT_DATA_COMMON(FxGlobals) \
49 TraceLoggingStruct(1, "CensusCommonV1"), \
50 TraceLoggingGuid((FxGlobals)->TelemetryContext->DriverSessionGUID, "SessionGUID")
72#define WDF_CENSUS_EVT_WRITE_DRIVER_LOAD(TraceHandle, Globals, DrvImage, WdfVersion) \
73 TraceLoggingWrite(TraceHandle, \
74 "WdfCensusEvtDrvLoad", \
75 WDF_TELEMETRY_EVT_KEYWORDS, \
76 WDF_CENSUS_EVT_DATA_COMMON(Globals), \
77 TraceLoggingStruct(9, "DriverInfo" ), \
78 TraceLoggingString((Globals)->Public.DriverName, "DriverService" ), \
79 TraceLoggingWideString(DrvImage, "DriverImage" ), \
80 TraceLoggingWideString(WdfVersion, "WdfVersion" ), \
81 TraceLoggingUInt32((Globals)->WdfBindInfo->Version.Major, "DriverVersionMajor" ), \
82 TraceLoggingUInt32((Globals)->WdfBindInfo->Version.Minor, "DriverVersionMinor" ), \
83 TraceLoggingBoolean((Globals)->FxVerifierOn, "FxVerifierOn" ), \
84 TraceLoggingBoolean(!!((Globals)->Public.DriverFlags & WdfDriverInitNonPnpDriver), "DriverNonPnP" ), \
85 TraceLoggingBoolean(!!((Globals)->Public.DriverFlags & WdfDriverInitNoDispatchOverride), "DriverNoDispatchOverride" ), \
86 TraceLoggingUInt32((Globals)->FxEnhancedVerifierOptions, "FxEnhancedVeriferOptions" ) \
89#define MIN_HOURS_BEFORE_NEXT_LOG 24
92#define WDF_LAST_TELEMETRY_LOG_TIME_VALUE L"TimeOfLastTelemetryLog"
93#define WDF_DRIVER_IMAGE_NAME_VALUE L"ImagePath"
115#define WDF_VERSION_STRING_SIZE_INCLUDING_SEPARATOR_CCH 10
139 return (
NULL != FxDrvGlobals->TelemetryContext);
194#if defined(__cplusplus)
PRTL_UNICODE_STRING_BUFFER Path
CLIPBOARD_GLOBALS Globals
#define FLAG_TO_BOOL(_Flags, _FlagMask)
VOID RegisterTelemetryProvider(VOID)
VOID UnregisterTelemetryProvider(VOID)
BOOLEAN __inline IsDeviceInfoFlagSet(_In_ USHORT DeviceInfo, _In_ FxDeviceInfoFlags Flag)
enum _FX_TELEMETRY_DO_ONCE_BITS FX_TELEMETRY_DO_ONCE_BITS
VOID GetNameFromPath(_In_ PCUNICODE_STRING Path, _Out_ PUNICODE_STRING Name)
VOID __inline BuildStringFromPartialInfo(_In_ PKEY_VALUE_PARTIAL_INFORMATION Info, _Out_ PUNICODE_STRING String)
VOID LogDeviceStartTelemetryEvent(_In_ PFX_DRIVER_GLOBALS Globals, _In_opt_ FxDevice *Fdo)
_Must_inspect_result_ NTSTATUS GetImageName(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _Out_ PUNICODE_STRING ImageName)
VOID AllocAndInitializeTelemetryContext(_In_ PFX_TELEMETRY_CONTEXT *TelemetryContext)
VOID LogDriverInfoStream(_In_ PFX_DRIVER_GLOBALS Globals, _In_opt_ FxDevice *Fdo)
@ DeviceInfoHasStaticChildren
@ DeviceInfoLineBasedEdgeTriggeredInterrupt
@ DeviceInfoMsi22MultiMessageInterrupt
@ DeviceInfoMsiXOrSingleMsi22Interrupt
@ DeviceInfoIsUsingDriverWppRecorder
@ DeviceInfoLineBasedLevelTriggeredInterrupt
@ DeviceInfoDmaSystemDuplex
@ DeviceInfoHasDynamicChildren
@ DeviceInfoPassiveLevelInterrupt
_FX_TELEMETRY_DO_ONCE_BITS
__inline BOOLEAN IsDriverTelemetryContextInitialized(_In_ PFX_DRIVER_GLOBALS FxDrvGlobals)
static const char * ImageName
#define _Must_inspect_result_
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFDEVICE Fdo