1 /****************************************************************************** 2 * WMI Library Support Functions * 3 ******************************************************************************/ 4 5 #ifdef RUN_WPP 6 #if (NTDDI_VERSION >= NTDDI_WINXP) 7 _IRQL_requires_max_(HIGH_LEVEL) 8 NTKERNELAPI 9 NTSTATUS 10 __cdecl 11 WmiTraceMessage( 12 _In_ TRACEHANDLE LoggerHandle, 13 _In_ ULONG MessageFlags, 14 _In_ LPGUID MessageGuid, 15 _In_ USHORT MessageNumber, 16 ...); 17 #endif 18 #endif /* RUN_WPP */ 19 20 #if (NTDDI_VERSION >= NTDDI_WINXP) 21 22 _IRQL_requires_max_(APC_LEVEL) 23 NTKERNELAPI 24 NTSTATUS 25 NTAPI 26 WmiQueryTraceInformation( 27 _In_ TRACE_INFORMATION_CLASS TraceInformationClass, 28 _Out_writes_bytes_(TraceInformationLength) PVOID TraceInformation, 29 _In_ ULONG TraceInformationLength, 30 _Out_opt_ PULONG RequiredLength, 31 _In_opt_ PVOID Buffer); 32 33 #if 0 34 /* FIXME: Get va_list from where? */ 35 _IRQL_requires_max_(HIGH_LEVEL) 36 NTKERNELAPI 37 NTSTATUS 38 NTAPI 39 WmiTraceMessageVa( 40 _In_ TRACEHANDLE LoggerHandle, 41 _In_ ULONG MessageFlags, 42 _In_ LPGUID MessageGuid, 43 _In_ USHORT MessageNumber, 44 _In_ va_list MessageArgList); 45 #endif 46 47 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ 48 49 #ifndef TRACE_INFORMATION_CLASS_DEFINE 50 51 #if (NTDDI_VERSION >= NTDDI_WINXP) 52 _IRQL_requires_max_(APC_LEVEL) 53 NTKERNELAPI 54 NTSTATUS 55 NTAPI 56 WmiQueryTraceInformation( 57 _In_ TRACE_INFORMATION_CLASS TraceInformationClass, 58 _Out_writes_bytes_(TraceInformationLength) PVOID TraceInformation, 59 _In_ ULONG TraceInformationLength, 60 _Out_opt_ PULONG RequiredLength, 61 _In_opt_ PVOID Buffer); 62 #endif 63 64 #define TRACE_INFORMATION_CLASS_DEFINE 65 66 #endif /* TRACE_INFOPRMATION_CLASS_DEFINE */ 67 68 #if (NTDDI_VERSION >= NTDDI_VISTA) 69 70 _IRQL_requires_max_(PASSIVE_LEVEL) 71 NTSTATUS 72 NTKRNLVISTAAPI 73 NTAPI 74 EtwRegister( 75 _In_ LPCGUID ProviderId, 76 _In_opt_ PETWENABLECALLBACK EnableCallback, 77 _In_opt_ PVOID CallbackContext, 78 _Out_ PREGHANDLE RegHandle); 79 80 _IRQL_requires_max_(PASSIVE_LEVEL) 81 NTSTATUS 82 NTKRNLVISTAAPI 83 NTAPI 84 EtwUnregister( 85 _In_ REGHANDLE RegHandle); 86 87 _IRQL_requires_max_(HIGH_LEVEL) 88 BOOLEAN 89 NTKERNELAPI 90 NTAPI 91 EtwEventEnabled( 92 _In_ REGHANDLE RegHandle, 93 _In_ PCEVENT_DESCRIPTOR EventDescriptor); 94 95 _IRQL_requires_max_(HIGH_LEVEL) 96 BOOLEAN 97 NTKERNELAPI 98 NTAPI 99 EtwProviderEnabled( 100 _In_ REGHANDLE RegHandle, 101 _In_ UCHAR Level, 102 _In_ ULONGLONG Keyword); 103 104 _When_(ControlCode==EVENT_ACTIVITY_CTRL_CREATE_ID, _IRQL_requires_max_(HIGH_LEVEL)) 105 _When_(ControlCode!=EVENT_ACTIVITY_CTRL_CREATE_ID, _IRQL_requires_max_(APC_LEVEL)) 106 NTSTATUS 107 NTKERNELAPI 108 NTAPI 109 EtwActivityIdControl( 110 _In_ ULONG ControlCode, 111 _Inout_updates_bytes_(sizeof(GUID)) LPGUID ActivityId); 112 113 _IRQL_requires_max_(HIGH_LEVEL) 114 NTSTATUS 115 NTKRNLVISTAAPI 116 NTAPI 117 EtwWrite( 118 _In_ REGHANDLE RegHandle, 119 _In_ PCEVENT_DESCRIPTOR EventDescriptor, 120 _In_opt_ LPCGUID ActivityId, 121 _In_ ULONG UserDataCount, 122 _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); 123 124 _IRQL_requires_max_(HIGH_LEVEL) 125 NTSTATUS 126 NTKERNELAPI 127 NTAPI 128 EtwWriteTransfer( 129 _In_ REGHANDLE RegHandle, 130 _In_ PCEVENT_DESCRIPTOR EventDescriptor, 131 _In_opt_ LPCGUID ActivityId, 132 _In_opt_ LPCGUID RelatedActivityId, 133 _In_ ULONG UserDataCount, 134 _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); 135 136 _IRQL_requires_max_(HIGH_LEVEL) 137 NTSTATUS 138 NTKERNELAPI 139 NTAPI 140 EtwWriteString( 141 _In_ REGHANDLE RegHandle, 142 _In_ UCHAR Level, 143 _In_ ULONGLONG Keyword, 144 _In_opt_ LPCGUID ActivityId, 145 _In_ PCWSTR String); 146 147 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ 148 149 #if (NTDDI_VERSION >= NTDDI_WIN7) 150 _IRQL_requires_max_(HIGH_LEVEL) 151 NTSTATUS 152 NTKERNELAPI 153 NTAPI 154 EtwWriteEx( 155 _In_ REGHANDLE RegHandle, 156 _In_ PCEVENT_DESCRIPTOR EventDescriptor, 157 _In_ ULONG64 Filter, 158 _In_ ULONG Flags, 159 _In_opt_ LPCGUID ActivityId, 160 _In_opt_ LPCGUID RelatedActivityId, 161 _In_ ULONG UserDataCount, 162 _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); 163 #endif 164 165 166 167