218 int sessionIdBit =
item.Key.sessionIdBit;
219 int etwSessionId =
item.Key.etwSessionId;
237 if (
num3 < data.Length)
367 for (
int i = 0; i <
ptr3->InstanceCount; i++)
372 for (
int j = 0;
j <
ptr4->EnableCount;
j++)
377 if (
ptr4->NextOffset == 0)
407 if (
sessions[i].etwSessionId == etwSessionId)
423 text =
"Software\\Wow6432Node" +
text;
488 if ((
array = data
as byte[]) !=
null)
575 *
ptr10 = (ushort)data;
583 *
ptr11 = (float)data;
591 *
ptr12 = (double)data;
622 *
ptr15 = (decimal)data;
629 if (((
DateTime)data).Ticks > 504911232000000000
L)
631 num = ((
DateTime)data).ToFileTimeUtc();
665 text = ((data !=
null) ? data.ToString() :
"");
672 return ((
object)
text) ?? ((
object)
array);
707 for (
int j = 0;
j < 2 * num;
j++)
725 if (!(
obj is string))
734 if (i >=
span2.Length)
809 if (
span2[0] !=
null)
813 if (
span2[1] !=
null)
817 if (
span2[2] !=
null)
821 if (
span2[3] !=
null)
825 if (
span2[4] !=
null)
829 if (
span2[5] !=
null)
833 if (
span2[6] !=
null)
837 if (
span2[7] !=
null)
850 if (
span2[0] !=
null)
854 if (
span2[1] !=
null)
858 if (
span2[2] !=
null)
862 if (
span2[3] !=
null)
866 if (
span2[4] !=
null)
870 if (
span2[5] !=
null)
874 if (
span2[6] !=
null)
878 if (
span2[7] !=
null)
903 if (
span2[0] !=
null)
907 if (
span2[1] !=
null)
911 if (
span2[2] !=
null)
915 if (
span2[3] !=
null)
919 if (
span2[4] !=
null)
923 if (
span2[5] !=
null)
927 if (
span2[6] !=
null)
931 if (
span2[7] !=
null)
944 if (
span2[0] !=
null)
948 if (
span2[1] !=
null)
952 if (
span2[2] !=
null)
956 if (
span2[3] !=
null)
960 if (
span2[4] !=
null)
964 if (
span2[5] !=
null)
968 if (
span2[6] !=
null)
972 if (
span2[7] !=
null)
1009 if (
span2[0] !=
null)
1013 if (
span2[1] !=
null)
1017 if (
span2[2] !=
null)
1021 if (
span2[3] !=
null)
1025 if (
span2[4] !=
null)
1029 if (
span2[5] !=
null)
1033 if (
span2[6] !=
null)
1037 if (
span2[7] !=
null)
1050 if (
span2[0] !=
null)
1054 if (
span2[1] !=
null)
1058 if (
span2[2] !=
null)
1062 if (
span2[3] !=
null)
1066 if (
span2[4] !=
null)
1070 if (
span2[5] !=
null)
1074 if (
span2[6] !=
null)
1078 if (
span2[7] !=
null)
1103 if (
span2[0] !=
null)
1107 if (
span2[1] !=
null)
1111 if (
span2[2] !=
null)
1115 if (
span2[3] !=
null)
1119 if (
span2[4] !=
null)
1123 if (
span2[5] !=
null)
1127 if (
span2[6] !=
null)
1131 if (
span2[7] !=
null)
1144 if (
span2[0] !=
null)
1148 if (
span2[1] !=
null)
1152 if (
span2[2] !=
null)
1156 if (
span2[3] !=
null)
1160 if (
span2[4] !=
null)
1164 if (
span2[5] !=
null)
1168 if (
span2[6] !=
null)
1172 if (
span2[7] !=
null)
1221 if (
span2[0] !=
null)
1225 if (
span2[1] !=
null)
1229 if (
span2[2] !=
null)
1233 if (
span2[3] !=
null)
1237 if (
span2[4] !=
null)
1241 if (
span2[5] !=
null)
1245 if (
span2[6] !=
null)
1249 if (
span2[7] !=
null)
1262 if (
span2[0] !=
null)
1266 if (
span2[1] !=
null)
1270 if (
span2[2] !=
null)
1274 if (
span2[3] !=
null)
1278 if (
span2[4] !=
null)
1282 if (
span2[5] !=
null)
1286 if (
span2[6] !=
null)
1290 if (
span2[7] !=
null)
1315 if (
span2[0] !=
null)
1319 if (
span2[1] !=
null)
1323 if (
span2[2] !=
null)
1327 if (
span2[3] !=
null)
1331 if (
span2[4] !=
null)
1335 if (
span2[5] !=
null)
1339 if (
span2[6] !=
null)
1343 if (
span2[7] !=
null)
1356 if (
span2[0] !=
null)
1360 if (
span2[1] !=
null)
1364 if (
span2[2] !=
null)
1368 if (
span2[3] !=
null)
1372 if (
span2[4] !=
null)
1376 if (
span2[5] !=
null)
1380 if (
span2[6] !=
null)
1384 if (
span2[7] !=
null)
1421 if (
span2[0] !=
null)
1425 if (
span2[1] !=
null)
1429 if (
span2[2] !=
null)
1433 if (
span2[3] !=
null)
1437 if (
span2[4] !=
null)
1441 if (
span2[5] !=
null)
1445 if (
span2[6] !=
null)
1449 if (
span2[7] !=
null)
1462 if (
span2[0] !=
null)
1466 if (
span2[1] !=
null)
1470 if (
span2[2] !=
null)
1474 if (
span2[3] !=
null)
1478 if (
span2[4] !=
null)
1482 if (
span2[5] !=
null)
1486 if (
span2[6] !=
null)
1490 if (
span2[7] !=
null)
1515 if (
span2[0] !=
null)
1519 if (
span2[1] !=
null)
1523 if (
span2[2] !=
null)
1527 if (
span2[3] !=
null)
1531 if (
span2[4] !=
null)
1535 if (
span2[5] !=
null)
1539 if (
span2[6] !=
null)
1543 if (
span2[7] !=
null)
1556 if (
span2[0] !=
null)
1560 if (
span2[1] !=
null)
1564 if (
span2[2] !=
null)
1568 if (
span2[3] !=
null)
1572 if (
span2[4] !=
null)
1576 if (
span2[5] !=
null)
1580 if (
span2[6] !=
null)
1584 if (
span2[7] !=
null)
1606 for (
int l = 0;
l < i;
l++)
1625 for (
int m = 0;
m < i;
m++)
static readonly RegistryKey LocalMachine
static unsafe int EnumerateTraceGuidsEx(TRACE_QUERY_INFO_CLASS TraceQueryInfoClass, void *InBuffer, int InBufferSize, void *OutBuffer, int OutBufferSize, out int ReturnLength)
unsafe delegate void EtwEnableCallback(in Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, EVENT_FILTER_DESCRIPTOR *filterData, void *callbackContext)
static unsafe int EventSetInformation(long registrationHandle, EVENT_INFO_CLASS informationClass, void *eventInformation, uint informationLength)
static uint GetCurrentProcessId()
static string GetMessage(int errorCode)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void Add(TKey key, TValue value)
static long ToInt64(object? value)
static object EventListenersLock
static unsafe object EncodeObject(ref object data, ref EventData *dataDescriptor, ref byte *dataBuffer, ref uint totalEventSize)
virtual void Dispose(bool disposing)
unsafe void Register(EventSource eventSource)
static WriteEventErrorCode GetLastWriteEventError()
unsafe int SetInformation(Interop.Advapi32.EVENT_INFO_CLASS eventInfoClass, void *data, uint dataSize)
IEventProvider m_eventProvider
unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid *activityID, Guid *childActivityID, int dataCount, IntPtr data)
unsafe void EtwEnableCallBack(in Guid sourceId, int controlCode, byte setLevel, long anyKeyword, long allKeyword, Interop.Advapi32.EVENT_FILTER_DESCRIPTOR *filterData, void *callbackContext)
static void SetLastError(WriteEventErrorCode error)
EventKeywords MatchAllKeyword
unsafe bool GetDataFromController(int etwSessionId, Interop.Advapi32.EVENT_FILTER_DESCRIPTOR *filterData, out ControllerCommand command, out byte[] data, out int dataStart)
List< SessionInfo > m_liveSessions
static int IndexOfSessionInList(List< SessionInfo > sessions, int etwSessionId)
Interop.Advapi32.EtwEnableCallback m_etwCallback
delegate void SessionInfoCallback(int etwSessionId, long matchAllKeywords, ref List< SessionInfo > sessionList)
unsafe bool WriteEventRaw(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid *activityID, Guid *relatedActivityID, int dataCount, IntPtr data)
static void GetSessionInfoCallback(int etwSessionId, long matchAllKeywords, ref List< SessionInfo > sessionList)
virtual void OnControllerCommand(ControllerCommand command, IDictionary< string, string > arguments, int sessionId, int etwSessionId)
static int FindNull(byte[] buffer, int idx)
const int EtwAPIMaxRefObjCount
const int EtwMaxNumberArguments
bool IsEnabled(byte level, long keywords)
static bool m_setInformationMissing
const int TraceEventMaximumSize
unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid *activityID, Guid *childActivityID, object[] eventPayload)
EventKeywords MatchAnyKeyword
unsafe uint EventRegister(EventSource eventSource, Interop.Advapi32.EtwEnableCallback enableCallback)
EventProvider(EventProviderType providerType)
static WriteEventErrorCode s_returnCode
unsafe void GetSessionInfo(SessionInfoCallback action, ref List< SessionInfo > sessionList)
void EventUnregister(long registrationHandle)
const int BasicTypeAllocationBufferSize
List< KeyValuePair< SessionInfo, bool > > GetSessions()
static Type GetUnderlyingType(Type enumType)
static void SuppressFinalize(object obj)
static CultureInfo InvariantCulture
static int TrailingZeroCount(int value)
static int PopCount(uint value)
static void FreeHGlobal(IntPtr hglobal)
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
static IntPtr AllocHGlobal(int cb)
unsafe uint EventRegister(EventSource eventSource, Interop.Advapi32.EtwEnableCallback enableCallback, void *callbackContext, ref long registrationHandle)
unsafe EventProvider.WriteEventErrorCode EventWriteTransfer(long registrationHandle, in EventDescriptor eventDescriptor, IntPtr eventHandle, Guid *activityId, Guid *relatedActivityId, int userDataCount, EventProvider.EventData *userData)
uint EventUnregister(long registrationHandle)
SessionInfo(int sessionIdBit_, int etwSessionId_)
static SessionMask FromEventKeywords(ulong m)
override string ToString()
static GCHandle Alloc(object? value)