ReactOS  0.4.13-dev-479-gec9c8fd
wmifuncs.h File Reference

Go to the source code of this file.

Macros

#define TRACE_INFORMATION_CLASS_DEFINE
 

Functions

 _IRQL_requires_max_ (APC_LEVEL) NTKERNELAPI NTSTATUS NTAPI WmiQueryTraceInformation(_In_ TRACE_INFORMATION_CLASS TraceInformationClass
 
 _Out_writes_bytes_ (TraceInformationLength) PVOID TraceInformation
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) NTSTATUS NTKERNELAPI NTAPI EtwRegister(_In_ LPCGUID ProviderId
 
 _IRQL_requires_max_ (HIGH_LEVEL) BOOLEAN NTKERNELAPI NTAPI EtwEventEnabled(_In_ REGHANDLE RegHandle
 
 _When_ (ControlCode==EVENT_ACTIVITY_CTRL_CREATE_ID, _IRQL_requires_max_(HIGH_LEVEL)) _When_(ControlCode!
 
 _Inout_updates_bytes_ (sizeof(GUID)) LPGUID ActivityId)
 
_In_ PCEVENT_DESCRIPTOR _In_opt_ LPCGUID _In_ ULONG _In_reads_opt_ (UserDataCount) PEVENT_DATA_DESCRIPTOR UserData)
 

Variables

_In_ ULONG TraceInformationLength
 
_In_ ULONG _Out_opt_ PULONG RequiredLength
 
_In_ ULONG _Out_opt_ PULONG _In_opt_ PVOID Buffer
 
_In_opt_ PETWENABLECALLBACK EnableCallback
 
_In_opt_ PETWENABLECALLBACK _In_opt_ PVOID CallbackContext
 
_In_opt_ PETWENABLECALLBACK _In_opt_ PVOID _Out_ PREGHANDLE RegHandle
 
_In_ PCEVENT_DESCRIPTOR EventDescriptor
 
_In_ UCHAR Level
 
_In_ UCHAR _In_ ULONGLONG Keyword
 
_In_ PCEVENT_DESCRIPTOR _In_opt_ LPCGUID ActivityId
 
_In_ PCEVENT_DESCRIPTOR _In_opt_ LPCGUID _In_ ULONG UserDataCount
 
_In_ PCEVENT_DESCRIPTOR _In_opt_ LPCGUID _In_opt_ LPCGUID RelatedActivityId
 
_In_ UCHAR _In_ ULONGLONG _In_opt_ LPCGUID _In_ PCWSTR String
 
_In_ PCEVENT_DESCRIPTOR _In_ ULONG64 Filter
 
_In_ PCEVENT_DESCRIPTOR _In_ ULONG64 _In_ ULONG Flags
 

Macro Definition Documentation

◆ TRACE_INFORMATION_CLASS_DEFINE

#define TRACE_INFORMATION_CLASS_DEFINE

Definition at line 64 of file wmifuncs.h.

Function Documentation

◆ _In_reads_opt_()

◆ _Inout_updates_bytes_()

_Inout_updates_bytes_ ( sizeof(GUID )

◆ _IRQL_requires_max_() [1/3]

_IRQL_requires_max_ ( APC_LEVEL  )

◆ _IRQL_requires_max_() [2/3]

_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 64 of file Messaging.c.

75 {
76  PFLT_SERVER_PORT_OBJECT PortObject;
78 
79  /* The caller must allow at least one connection */
80  if (MaxConnections == 0)
81  {
83  }
84 
85  /* The request must be for a kernel handle */
86  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87  {
89  }
90 
91  /*
92  * Get rundown protection on the target to stop the owner
93  * from unloading whilst this port object is open. It gets
94  * removed in the FltpServerPortClose callback
95  */
97  if (!NT_SUCCESS(Status))
98  {
99  return Status;
100  }
101 
102  /* Create the server port object for this filter */
106  KernelMode,
107  NULL,
108  sizeof(FLT_SERVER_PORT_OBJECT),
109  0,
110  0,
111  (PVOID *)&PortObject);
112  if (NT_SUCCESS(Status))
113  {
114  /* Zero out the struct */
115  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116 
117  /* Increment the ref count on the target filter */
119 
120  /* Setup the filter port object */
121  PortObject->Filter = Filter;
122  PortObject->ConnectNotify = ConnectNotifyCallback;
124  PortObject->MessageNotify = MessageNotifyCallback;
125  PortObject->Cookie = ServerPortCookie;
126  PortObject->MaxConnections = MaxConnections;
127 
128  /* Insert the object */
129  Status = ObInsertObject(PortObject,
130  NULL,
132  0,
133  NULL,
135  if (NT_SUCCESS(Status))
136  {
137  /* Lock the connection list */
139 
140  /* Add the new port object to the connection list and increment the count */
143 
144  /* Unlock the connection list*/
146  }
147  }
148 
149  if (!NT_SUCCESS(Status))
150  {
151  /* Allow the filter to be cleaned up */
153  }
154 
155  return Status;
156 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
LONG NTSTATUS
Definition: precomp.h:26
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:952
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2932
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121

◆ _IRQL_requires_max_() [3/3]

_IRQL_requires_max_ ( HIGH_LEVEL  )

Definition at line 68 of file ke.h.

73 {
74  return (KIRQL)__readcr8();
75 }
__INTRIN_INLINE unsigned long __readcr8(void)
Definition: intrin_x86.h:1721
UCHAR KIRQL
Definition: env_spec_w32.h:591

◆ _Out_writes_bytes_()

_Out_writes_bytes_ ( TraceInformationLength  )

◆ _When_()

Variable Documentation

◆ ActivityId

Definition at line 119 of file wmifuncs.h.

Referenced by STRUCT().

◆ Buffer

Definition at line 29 of file wmifuncs.h.

◆ CallbackContext

_In_opt_ PETWENABLECALLBACK _In_opt_ PVOID CallbackContext

Definition at line 76 of file wmifuncs.h.

◆ EnableCallback

_In_opt_ PETWENABLECALLBACK EnableCallback

Definition at line 76 of file wmifuncs.h.

◆ EventDescriptor

◆ Filter

Definition at line 156 of file wmifuncs.h.

◆ Flags

◆ Keyword

Definition at line 101 of file wmifuncs.h.

◆ Level

_In_ UCHAR Level

Definition at line 101 of file wmifuncs.h.

◆ RegHandle

◆ RelatedActivityId

Definition at line 130 of file wmifuncs.h.

◆ RequiredLength

◆ String

Definition at line 142 of file wmifuncs.h.

◆ TraceInformationLength

_In_ ULONG TraceInformationLength

Definition at line 29 of file wmifuncs.h.

◆ UserDataCount