/winbase/Eventing/Provider/Advanced/CSharp/AdvancedProviderEvents.cs

https://github.com/pauldotknopf/WindowsSDK7-Samples · C# · 1511 lines · 980 code · 388 blank · 143 comment · 68 complexity · 88a87512240b966ed8aedc9967926b53 MD5 · raw file

  1. //---------------------------------------------------------------------
  2. // <autogenerated>
  3. //
  4. // Generated by Message Compiler (mc.exe)
  5. //
  6. // Copyright (c) Microsoft Corporation. All Rights Reserved.
  7. //
  8. // Changes to this file may cause incorrect behavior and will be lost if
  9. // the code is regenerated.
  10. // </autogenerated>
  11. //---------------------------------------------------------------------
  12. namespace AdvancedProvider
  13. {
  14. using System;
  15. using System.Collections.Generic;
  16. using System.Text;
  17. using System.Diagnostics;
  18. using System.Diagnostics.Eventing;
  19. using Microsoft.Win32;
  20. using System.Runtime.InteropServices;
  21. using System.Security.Principal;
  22. public class MicrosoftWindowsSDKSampleAdvancedProviderCs
  23. {
  24. //
  25. // Provider Microsoft-Windows-SDKSample-AdvancedProvider-CS Event Count 41
  26. //
  27. private EventProviderVersionTwo m_provider = new EventProviderVersionTwo(new Guid("21a9201e-73b0-43fe-9821-7e159a59bc72"));
  28. //
  29. // Task : eventGUIDs
  30. //
  31. //
  32. // Event Descriptors
  33. //
  34. private EventDescriptor SampleEvt_INT8;
  35. private EventDescriptor SampleEvt_UINT8;
  36. private EventDescriptor SampleEvt_UINT8_HEXINT8;
  37. private EventDescriptor SampleEvt_INT16;
  38. private EventDescriptor SampleEvt_UINT16;
  39. private EventDescriptor SampleEvt_UINT16_HexInt16;
  40. private EventDescriptor SampleEvt_INT32;
  41. private EventDescriptor SampleEvt_UINT32;
  42. private EventDescriptor SampleEvt_UINT32_PID;
  43. private EventDescriptor SampleEvt_UINT32_TID;
  44. private EventDescriptor SampleEvt_UINT32_IPV4;
  45. private EventDescriptor SampleEvt_UINT32_ERRORCODE;
  46. private EventDescriptor SampleEvt_UINT32_HEXINT32;
  47. private EventDescriptor SampleEvt_INT64;
  48. private EventDescriptor SampleEvt_UINT64;
  49. private EventDescriptor SampleEvt_UINT64_HEXInt64;
  50. private EventDescriptor SampleEvt_FLOAT;
  51. private EventDescriptor SampleEvt_DOUBLE;
  52. private EventDescriptor SampleEvt_BOOL;
  53. private EventDescriptor SampleEvt_GUID;
  54. private EventDescriptor SampleEvt_POINTER;
  55. private EventDescriptor SampleEvt_FILETIME;
  56. private EventDescriptor SampleEvt_SID;
  57. private EventDescriptor SampleEvt_UnicodeString;
  58. private EventDescriptor SampleEvt_FixedLength_UnicodeString;
  59. private EventDescriptor SampleEvt_ParamLength_UnicodeString;
  60. private EventDescriptor SampleEvt_UserChannel_UnicodeString;
  61. private EventDescriptor SampleEvt_UserChannel_UINT8;
  62. private EventDescriptor SampleEvt_UserKeyword_UINT8;
  63. private EventDescriptor SampleEvt_Alignment_UInt8_UnicodeString;
  64. private EventDescriptor SampleEvt_ValueMap_UInt8;
  65. private EventDescriptor SampleEvt_BitMap_UInt8;
  66. private EventDescriptor SampleEvt_UInt32_Win32Error;
  67. private EventDescriptor SampleEvt_UInt32_NTSTATUS;
  68. private EventDescriptor SampleEvt_Int32_HResult;
  69. private EventDescriptor SampleEvt_INT8_V1;
  70. private EventDescriptor SampleEvt_INT8_V2;
  71. private EventDescriptor SampleEvt_UnicodeString_V1;
  72. private EventDescriptor SampleEvt_FixedCount_Int8_V1;
  73. private EventDescriptor SampleEvt_FixedCount_Int8_V3;
  74. private EventDescriptor SampleEvt_Int32_HResult_V2;
  75. public MicrosoftWindowsSDKSampleAdvancedProviderCs()
  76. {
  77. unchecked
  78. {
  79. SampleEvt_INT8 = new EventDescriptor(0x66, 0x0, 0x8, 0x1, 0x1, 0x64, (long)0x8000000000000000);
  80. SampleEvt_UINT8 = new EventDescriptor(0x67, 0x0, 0x8, 0x1, 0x2, 0x64, (long)0x8040000000000000);
  81. SampleEvt_UINT8_HEXINT8 = new EventDescriptor(0x68, 0x0, 0x8, 0x1, 0x0, 0x64, (long)0x8000000000000000);
  82. SampleEvt_INT16 = new EventDescriptor(0x69, 0x0, 0x8, 0x1, 0x7, 0x64, (long)0x8000000000000000);
  83. SampleEvt_UINT16 = new EventDescriptor(0x6a, 0x0, 0x8, 0x1, 0x8, 0x64, (long)0x8000000000000000);
  84. SampleEvt_UINT16_HexInt16 = new EventDescriptor(0x6b, 0x0, 0x8, 0x1, 0x9, 0x64, (long)0x8000000000000000);
  85. SampleEvt_INT32 = new EventDescriptor(0x6c, 0x0, 0x8, 0x1, 0xf0, 0x64, (long)0x8000000000000000);
  86. SampleEvt_UINT32 = new EventDescriptor(0x6d, 0x0, 0x8, 0x1, 0xa, 0x64, (long)0x8000000000000000);
  87. SampleEvt_UINT32_PID = new EventDescriptor(0x6e, 0x0, 0x8, 0x1, 0xb, 0x64, (long)0x8000000000000000);
  88. SampleEvt_UINT32_TID = new EventDescriptor(0x6f, 0x0, 0x8, 0x1, 0x1, 0x65, (long)0x8000000000000000);
  89. SampleEvt_UINT32_IPV4 = new EventDescriptor(0x70, 0x0, 0x8, 0x1, 0x2, 0x65, (long)0x8000000000000000);
  90. SampleEvt_UINT32_ERRORCODE = new EventDescriptor(0x72, 0x0, 0x8, 0x1, 0x0, 0x65, (long)0x8000000000000000);
  91. SampleEvt_UINT32_HEXINT32 = new EventDescriptor(0x73, 0x0, 0x8, 0x1, 0x7, 0x65, (long)0x8000000000000000);
  92. SampleEvt_INT64 = new EventDescriptor(0x74, 0x0, 0x8, 0x1, 0x8, 0x65, (long)0x8000000000000000);
  93. SampleEvt_UINT64 = new EventDescriptor(0x75, 0x0, 0x8, 0x1, 0x9, 0x65, (long)0x8000000000000000);
  94. SampleEvt_UINT64_HEXInt64 = new EventDescriptor(0x76, 0x0, 0x8, 0x1, 0xf0, 0x65, (long)0x8000000000000000);
  95. SampleEvt_FLOAT = new EventDescriptor(0x77, 0x0, 0x8, 0x1, 0xa, 0x65, (long)0x8000000000000000);
  96. SampleEvt_DOUBLE = new EventDescriptor(0x78, 0x0, 0x8, 0x1, 0xb, 0x65, (long)0x8000000000000000);
  97. SampleEvt_BOOL = new EventDescriptor(0x79, 0x0, 0x8, 0x1, 0x1, 0x66, (long)0x8000000000000000);
  98. SampleEvt_GUID = new EventDescriptor(0x7d, 0x0, 0x8, 0x1, 0x2, 0x66, (long)0x8000000000000000);
  99. SampleEvt_POINTER = new EventDescriptor(0x7e, 0x0, 0x8, 0x1, 0x0, 0x66, (long)0x8000000000000000);
  100. SampleEvt_FILETIME = new EventDescriptor(0x7f, 0x0, 0x8, 0x1, 0x7, 0x66, (long)0x8000000000000000);
  101. SampleEvt_SID = new EventDescriptor(0x80, 0x0, 0x8, 0x1, 0x9, 0x66, (long)0x8000000000000000);
  102. SampleEvt_UnicodeString = new EventDescriptor(0xc8, 0x0, 0x9, 0x4, 0xf0, 0x66, (long)0x4000000000000000);
  103. SampleEvt_FixedLength_UnicodeString = new EventDescriptor(0xc9, 0x0, 0x9, 0x4, 0xb, 0x66, (long)0x4000000000000000);
  104. SampleEvt_ParamLength_UnicodeString = new EventDescriptor(0xca, 0x0, 0x9, 0x4, 0x0, 0x67, (long)0x4000000000000000);
  105. SampleEvt_UserChannel_UnicodeString = new EventDescriptor(0x258, 0x0, 0x11, 0x2, 0xe, 0x65, (long)0x1000000000000000);
  106. SampleEvt_UserChannel_UINT8 = new EventDescriptor(0x259, 0x0, 0x11, 0x2, 0x5, 0x66, (long)0x1000000000000000);
  107. SampleEvt_UserKeyword_UINT8 = new EventDescriptor(0x25a, 0x0, 0x11, 0x2, 0x6, 0x66, (long)0x1000000000000020);
  108. SampleEvt_Alignment_UInt8_UnicodeString = new EventDescriptor(0x25b, 0x0, 0x11, 0x2, 0xc, 0x66, (long)0x1000000000000020);
  109. SampleEvt_ValueMap_UInt8 = new EventDescriptor(0x25d, 0x0, 0x11, 0x2, 0xd, 0x66, (long)0x1000000000000020);
  110. SampleEvt_BitMap_UInt8 = new EventDescriptor(0x25e, 0x0, 0x11, 0x2, 0xe, 0x66, (long)0x1000000000000020);
  111. SampleEvt_UInt32_Win32Error = new EventDescriptor(0x2bc, 0x0, 0x11, 0x3, 0x5, 0x67, (long)0x1000000000000000);
  112. SampleEvt_UInt32_NTSTATUS = new EventDescriptor(0x2bd, 0x0, 0x11, 0x3, 0x6, 0x67, (long)0x1000000000000000);
  113. SampleEvt_Int32_HResult = new EventDescriptor(0x2be, 0x0, 0x11, 0x3, 0xc, 0x67, (long)0x1000000000000000);
  114. SampleEvt_INT8_V1 = new EventDescriptor(0x66, 0x1, 0x8, 0x1, 0xd, 0x67, (long)0x8000000000000000);
  115. SampleEvt_INT8_V2 = new EventDescriptor(0x66, 0x2, 0x8, 0x1, 0xe, 0x67, (long)0x8000000000000000);
  116. SampleEvt_UnicodeString_V1 = new EventDescriptor(0xc8, 0x1, 0x9, 0x4, 0x5, 0x68, (long)0x4000000000000000);
  117. SampleEvt_FixedCount_Int8_V1 = new EventDescriptor(0x12c, 0x1, 0x11, 0x3, 0x6, 0x68, (long)0x1000000000000000);
  118. SampleEvt_FixedCount_Int8_V3 = new EventDescriptor(0x12c, 0x3, 0x11, 0x3, 0xc, 0x68, (long)0x1000000000000000);
  119. SampleEvt_Int32_HResult_V2 = new EventDescriptor(0x2be, 0x2, 0x11, 0x3, 0xd, 0x68, (long)0x1000000000000000);
  120. }
  121. }
  122. //
  123. // Event method for SampleEvt_INT8
  124. //
  125. public bool EventWriteSampleEvt_INT8(sbyte Prop_Int8)
  126. {
  127. if (!m_provider.IsEnabled())
  128. {
  129. return true;
  130. }
  131. return m_provider.TemplateT_INT8(ref SampleEvt_INT8, Prop_Int8);
  132. }
  133. //
  134. // Event method for SampleEvt_UINT8
  135. //
  136. public bool EventWriteSampleEvt_UINT8(byte Prop_UInt8)
  137. {
  138. if (!m_provider.IsEnabled())
  139. {
  140. return true;
  141. }
  142. return m_provider.TemplateT_UINT8(ref SampleEvt_UINT8, Prop_UInt8);
  143. }
  144. //
  145. // Event method for SampleEvt_UINT8_HEXINT8
  146. //
  147. public bool EventWriteSampleEvt_UINT8_HEXINT8(byte Prop_UInt8_HexInt8)
  148. {
  149. if (!m_provider.IsEnabled())
  150. {
  151. return true;
  152. }
  153. return m_provider.TemplateT_UINT8_HEXINT8(ref SampleEvt_UINT8_HEXINT8, Prop_UInt8_HexInt8);
  154. }
  155. //
  156. // Event method for SampleEvt_INT16
  157. //
  158. public bool EventWriteSampleEvt_INT16(short Prop_Int16)
  159. {
  160. if (!m_provider.IsEnabled())
  161. {
  162. return true;
  163. }
  164. return m_provider.TemplateT_INT16(ref SampleEvt_INT16, Prop_Int16);
  165. }
  166. //
  167. // Event method for SampleEvt_UINT16
  168. //
  169. public bool EventWriteSampleEvt_UINT16(ushort Prop_UInt16)
  170. {
  171. if (!m_provider.IsEnabled())
  172. {
  173. return true;
  174. }
  175. return m_provider.TemplateT_UINT16(ref SampleEvt_UINT16, Prop_UInt16);
  176. }
  177. //
  178. // Event method for SampleEvt_UINT16_HexInt16
  179. //
  180. public bool EventWriteSampleEvt_UINT16_HexInt16(ushort Prop_UInt16_HexInt16)
  181. {
  182. if (!m_provider.IsEnabled())
  183. {
  184. return true;
  185. }
  186. return m_provider.TemplateT_UINT16_HexInt16(ref SampleEvt_UINT16_HexInt16, Prop_UInt16_HexInt16);
  187. }
  188. //
  189. // Event method for SampleEvt_INT32
  190. //
  191. public bool EventWriteSampleEvt_INT32(int Prop_Int32)
  192. {
  193. if (!m_provider.IsEnabled())
  194. {
  195. return true;
  196. }
  197. return m_provider.TemplateT_INT32(ref SampleEvt_INT32, Prop_Int32);
  198. }
  199. //
  200. // Event method for SampleEvt_UINT32
  201. //
  202. public bool EventWriteSampleEvt_UINT32(uint Prop_Uint32)
  203. {
  204. if (!m_provider.IsEnabled())
  205. {
  206. return true;
  207. }
  208. return m_provider.TemplateT_UINT32(ref SampleEvt_UINT32, Prop_Uint32);
  209. }
  210. //
  211. // Event method for SampleEvt_UINT32_PID
  212. //
  213. public bool EventWriteSampleEvt_UINT32_PID(uint Prop_UInt32_Pid)
  214. {
  215. if (!m_provider.IsEnabled())
  216. {
  217. return true;
  218. }
  219. return m_provider.TemplateT_UINT32_PID(ref SampleEvt_UINT32_PID, Prop_UInt32_Pid);
  220. }
  221. //
  222. // Event method for SampleEvt_UINT32_TID
  223. //
  224. public bool EventWriteSampleEvt_UINT32_TID(uint Prop_Uint32_Tid)
  225. {
  226. if (!m_provider.IsEnabled())
  227. {
  228. return true;
  229. }
  230. return m_provider.TemplateT_UINT32_TID(ref SampleEvt_UINT32_TID, Prop_Uint32_Tid);
  231. }
  232. //
  233. // Event method for SampleEvt_UINT32_IPV4
  234. //
  235. public bool EventWriteSampleEvt_UINT32_IPV4(uint Prop_Uint32_IPV4)
  236. {
  237. if (!m_provider.IsEnabled())
  238. {
  239. return true;
  240. }
  241. return m_provider.TemplateT_UINT32_IPV4(ref SampleEvt_UINT32_IPV4, Prop_Uint32_IPV4);
  242. }
  243. //
  244. // Event method for SampleEvt_UINT32_ERRORCODE
  245. //
  246. public bool EventWriteSampleEvt_UINT32_ERRORCODE(uint Prop_Uint32_ERRORCODE)
  247. {
  248. if (!m_provider.IsEnabled())
  249. {
  250. return true;
  251. }
  252. return m_provider.TemplateT_UINT32_ERRORCODE(ref SampleEvt_UINT32_ERRORCODE, Prop_Uint32_ERRORCODE);
  253. }
  254. //
  255. // Event method for SampleEvt_UINT32_HEXINT32
  256. //
  257. public bool EventWriteSampleEvt_UINT32_HEXINT32(uint Prop_Uint32_HEXINT32)
  258. {
  259. if (!m_provider.IsEnabled())
  260. {
  261. return true;
  262. }
  263. return m_provider.TemplateT_UINT32_HEXINT32(ref SampleEvt_UINT32_HEXINT32, Prop_Uint32_HEXINT32);
  264. }
  265. //
  266. // Event method for SampleEvt_INT64
  267. //
  268. public bool EventWriteSampleEvt_INT64(long Prop_Int64)
  269. {
  270. if (!m_provider.IsEnabled())
  271. {
  272. return true;
  273. }
  274. return m_provider.TemplateT_INT64(ref SampleEvt_INT64, Prop_Int64);
  275. }
  276. //
  277. // Event method for SampleEvt_UINT64
  278. //
  279. public bool EventWriteSampleEvt_UINT64(ulong Prop_UInt64)
  280. {
  281. if (!m_provider.IsEnabled())
  282. {
  283. return true;
  284. }
  285. return m_provider.TemplateT_UINT64(ref SampleEvt_UINT64, Prop_UInt64);
  286. }
  287. //
  288. // Event method for SampleEvt_UINT64_HEXInt64
  289. //
  290. public bool EventWriteSampleEvt_UINT64_HEXInt64(ulong Prop_UInt64_HEXInt64)
  291. {
  292. if (!m_provider.IsEnabled())
  293. {
  294. return true;
  295. }
  296. return m_provider.TemplateT_UINT64_HEXInt64(ref SampleEvt_UINT64_HEXInt64, Prop_UInt64_HEXInt64);
  297. }
  298. //
  299. // Event method for SampleEvt_FLOAT
  300. //
  301. public bool EventWriteSampleEvt_FLOAT(float Prop_Float)
  302. {
  303. if (!m_provider.IsEnabled())
  304. {
  305. return true;
  306. }
  307. return m_provider.TemplateT_FLOAT(ref SampleEvt_FLOAT, Prop_Float);
  308. }
  309. //
  310. // Event method for SampleEvt_DOUBLE
  311. //
  312. public bool EventWriteSampleEvt_DOUBLE(double Prop_Double)
  313. {
  314. if (!m_provider.IsEnabled())
  315. {
  316. return true;
  317. }
  318. return m_provider.TemplateT_DOUBLE(ref SampleEvt_DOUBLE, Prop_Double);
  319. }
  320. //
  321. // Event method for SampleEvt_BOOL
  322. //
  323. public bool EventWriteSampleEvt_BOOL(bool Prop_Bool)
  324. {
  325. if (!m_provider.IsEnabled())
  326. {
  327. return true;
  328. }
  329. return m_provider.TemplateT_BOOL(ref SampleEvt_BOOL, Prop_Bool);
  330. }
  331. //
  332. // Event method for SampleEvt_GUID
  333. //
  334. public bool EventWriteSampleEvt_GUID(Guid Prop_Guid)
  335. {
  336. if (!m_provider.IsEnabled())
  337. {
  338. return true;
  339. }
  340. return m_provider.TemplateT_GUID(ref SampleEvt_GUID, Prop_Guid);
  341. }
  342. //
  343. // Event method for SampleEvt_POINTER
  344. //
  345. public bool EventWriteSampleEvt_POINTER(IntPtr Prop_Pointer)
  346. {
  347. if (!m_provider.IsEnabled())
  348. {
  349. return true;
  350. }
  351. return m_provider.TemplateT_POINTER(ref SampleEvt_POINTER, Prop_Pointer);
  352. }
  353. //
  354. // Event method for SampleEvt_FILETIME
  355. //
  356. public bool EventWriteSampleEvt_FILETIME(DateTime Prop_FileTime)
  357. {
  358. if (!m_provider.IsEnabled())
  359. {
  360. return true;
  361. }
  362. return m_provider.TemplateT_FILETIME(ref SampleEvt_FILETIME, Prop_FileTime);
  363. }
  364. //
  365. // Event method for SampleEvt_SID
  366. //
  367. public bool EventWriteSampleEvt_SID(SecurityIdentifier Prop_SID)
  368. {
  369. if (!m_provider.IsEnabled())
  370. {
  371. return true;
  372. }
  373. return m_provider.TemplateT_SID(ref SampleEvt_SID, Prop_SID);
  374. }
  375. //
  376. // Event method for SampleEvt_UnicodeString
  377. //
  378. public bool EventWriteSampleEvt_UnicodeString(string Prop_UnicodeString)
  379. {
  380. return m_provider.WriteEvent(ref SampleEvt_UnicodeString, Prop_UnicodeString);
  381. }
  382. //
  383. // Event method for SampleEvt_FixedLength_UnicodeString
  384. //
  385. public bool EventWriteSampleEvt_FixedLength_UnicodeString(string Prop_FixedLength_UnicodeString)
  386. {
  387. return m_provider.WriteEvent(ref SampleEvt_FixedLength_UnicodeString, Prop_FixedLength_UnicodeString);
  388. }
  389. //
  390. // Event method for SampleEvt_ParamLength_UnicodeString
  391. //
  392. public bool EventWriteSampleEvt_ParamLength_UnicodeString(uint Prop_ParamLength_UnicodString_Length, string Prop_ParamLength_UnicodeString)
  393. {
  394. if (!m_provider.IsEnabled())
  395. {
  396. return true;
  397. }
  398. return m_provider.TemplateT_ParamLength_UnicodeString(ref SampleEvt_ParamLength_UnicodeString, Prop_ParamLength_UnicodString_Length, Prop_ParamLength_UnicodeString);
  399. }
  400. //
  401. // Event method for SampleEvt_UserChannel_UnicodeString
  402. //
  403. public bool EventWriteSampleEvt_UserChannel_UnicodeString(string Prop_UnicodeString)
  404. {
  405. return m_provider.WriteEvent(ref SampleEvt_UserChannel_UnicodeString, Prop_UnicodeString);
  406. }
  407. //
  408. // Event method for SampleEvt_UserChannel_UINT8
  409. //
  410. public bool EventWriteSampleEvt_UserChannel_UINT8(byte Prop_UInt8)
  411. {
  412. if (!m_provider.IsEnabled())
  413. {
  414. return true;
  415. }
  416. return m_provider.TemplateT_UINT8(ref SampleEvt_UserChannel_UINT8, Prop_UInt8);
  417. }
  418. //
  419. // Event method for SampleEvt_UserKeyword_UINT8
  420. //
  421. public bool EventWriteSampleEvt_UserKeyword_UINT8(byte Prop_UInt8)
  422. {
  423. if (!m_provider.IsEnabled())
  424. {
  425. return true;
  426. }
  427. return m_provider.TemplateT_UINT8(ref SampleEvt_UserKeyword_UINT8, Prop_UInt8);
  428. }
  429. //
  430. // Event method for SampleEvt_Alignment_UInt8_UnicodeString
  431. //
  432. public bool EventWriteSampleEvt_Alignment_UInt8_UnicodeString(byte Prop_Alignment_UInt8_UnicodeString_1, string Prop_Alignment_UInt8_UnicodeString_2)
  433. {
  434. if (!m_provider.IsEnabled())
  435. {
  436. return true;
  437. }
  438. return m_provider.TemplateT_Alignment_UInt8_UnicodeString(ref SampleEvt_Alignment_UInt8_UnicodeString, Prop_Alignment_UInt8_UnicodeString_1, Prop_Alignment_UInt8_UnicodeString_2);
  439. }
  440. //
  441. // Event method for SampleEvt_ValueMap_UInt8
  442. //
  443. public bool EventWriteSampleEvt_ValueMap_UInt8(byte Prop_ValueMap_Uint8)
  444. {
  445. if (!m_provider.IsEnabled())
  446. {
  447. return true;
  448. }
  449. return m_provider.TemplateT_ValueMap_UInt8(ref SampleEvt_ValueMap_UInt8, Prop_ValueMap_Uint8);
  450. }
  451. //
  452. // Event method for SampleEvt_BitMap_UInt8
  453. //
  454. public bool EventWriteSampleEvt_BitMap_UInt8(byte Prop_BitMap_Uint8)
  455. {
  456. if (!m_provider.IsEnabled())
  457. {
  458. return true;
  459. }
  460. return m_provider.TemplateT_BitMap_UInt8(ref SampleEvt_BitMap_UInt8, Prop_BitMap_Uint8);
  461. }
  462. //
  463. // Event method for SampleEvt_UInt32_Win32Error
  464. //
  465. public bool EventWriteSampleEvt_UInt32_Win32Error(uint Prop_UInt32_Win32Error)
  466. {
  467. if (!m_provider.IsEnabled())
  468. {
  469. return true;
  470. }
  471. return m_provider.TemplateT_UInt32_Win32Error(ref SampleEvt_UInt32_Win32Error, Prop_UInt32_Win32Error);
  472. }
  473. //
  474. // Event method for SampleEvt_UInt32_NTSTATUS
  475. //
  476. public bool EventWriteSampleEvt_UInt32_NTSTATUS(uint Prop_UInt32_NTSTATUS)
  477. {
  478. if (!m_provider.IsEnabled())
  479. {
  480. return true;
  481. }
  482. return m_provider.TemplateT_UInt32_NTSTATUS(ref SampleEvt_UInt32_NTSTATUS, Prop_UInt32_NTSTATUS);
  483. }
  484. //
  485. // Event method for SampleEvt_Int32_HResult
  486. //
  487. public bool EventWriteSampleEvt_Int32_HResult(int Prop_Int32_HResult)
  488. {
  489. if (!m_provider.IsEnabled())
  490. {
  491. return true;
  492. }
  493. return m_provider.TemplateT_Int32_HResult(ref SampleEvt_Int32_HResult, Prop_Int32_HResult);
  494. }
  495. //
  496. // Event method for SampleEvt_INT8_V1
  497. //
  498. public bool EventWriteSampleEvt_INT8_V1(sbyte Prop_Int8)
  499. {
  500. if (!m_provider.IsEnabled())
  501. {
  502. return true;
  503. }
  504. return m_provider.TemplateT_INT8(ref SampleEvt_INT8_V1, Prop_Int8);
  505. }
  506. //
  507. // Event method for SampleEvt_INT8_V2
  508. //
  509. public bool EventWriteSampleEvt_INT8_V2(sbyte Prop_Int8)
  510. {
  511. if (!m_provider.IsEnabled())
  512. {
  513. return true;
  514. }
  515. return m_provider.TemplateT_INT8(ref SampleEvt_INT8_V2, Prop_Int8);
  516. }
  517. //
  518. // Event method for SampleEvt_UnicodeString_V1
  519. //
  520. public bool EventWriteSampleEvt_UnicodeString_V1(string Prop_UnicodeString)
  521. {
  522. return m_provider.WriteEvent(ref SampleEvt_UnicodeString_V1, Prop_UnicodeString);
  523. }
  524. //
  525. // Event method for SampleEvt_FixedCount_Int8_V1
  526. //
  527. public bool EventWriteSampleEvt_FixedCount_Int8_V1(sbyte[] Prop_FixedCount_Int8)
  528. {
  529. if (!m_provider.IsEnabled())
  530. {
  531. return true;
  532. }
  533. return m_provider.TemplateT_FixedCount_Int8(ref SampleEvt_FixedCount_Int8_V1, Prop_FixedCount_Int8);
  534. }
  535. //
  536. // Event method for SampleEvt_FixedCount_Int8_V3
  537. //
  538. public bool EventWriteSampleEvt_FixedCount_Int8_V3(sbyte[] Prop_FixedCount_Int8)
  539. {
  540. if (!m_provider.IsEnabled())
  541. {
  542. return true;
  543. }
  544. return m_provider.TemplateT_FixedCount_Int8(ref SampleEvt_FixedCount_Int8_V3, Prop_FixedCount_Int8);
  545. }
  546. //
  547. // Event method for SampleEvt_Int32_HResult_V2
  548. //
  549. public bool EventWriteSampleEvt_Int32_HResult_V2(int Prop_Int32_HResult)
  550. {
  551. if (!m_provider.IsEnabled())
  552. {
  553. return true;
  554. }
  555. return m_provider.TemplateT_Int32_HResult(ref SampleEvt_Int32_HResult_V2, Prop_Int32_HResult);
  556. }
  557. }
  558. internal class EventProviderVersionTwo : EventProvider
  559. {
  560. internal EventProviderVersionTwo(Guid id)
  561. : base(id)
  562. {}
  563. [StructLayout(LayoutKind.Explicit, Size = 16)]
  564. private struct EventData
  565. {
  566. [FieldOffset(0)]
  567. internal UInt64 DataPointer;
  568. [FieldOffset(8)]
  569. internal uint Size;
  570. [FieldOffset(12)]
  571. internal int Reserved;
  572. }
  573. internal unsafe bool TemplateT_INT8(
  574. ref EventDescriptor eventDescriptor,
  575. sbyte Prop_Int8
  576. )
  577. {
  578. int argumentCount = 1;
  579. bool status = true;
  580. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  581. {
  582. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  583. EventData* userDataPtr = (EventData*)userData;
  584. userDataPtr[0].DataPointer = (UInt64)(&Prop_Int8);
  585. userDataPtr[0].Size = (uint)(sizeof(byte) );
  586. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  587. }
  588. return status;
  589. }
  590. internal unsafe bool TemplateT_UINT8(
  591. ref EventDescriptor eventDescriptor,
  592. byte Prop_UInt8
  593. )
  594. {
  595. int argumentCount = 1;
  596. bool status = true;
  597. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  598. {
  599. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  600. EventData* userDataPtr = (EventData*)userData;
  601. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt8);
  602. userDataPtr[0].Size = (uint)(sizeof(byte) );
  603. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  604. }
  605. return status;
  606. }
  607. internal unsafe bool TemplateT_UINT8_HEXINT8(
  608. ref EventDescriptor eventDescriptor,
  609. byte Prop_UInt8_HexInt8
  610. )
  611. {
  612. int argumentCount = 1;
  613. bool status = true;
  614. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  615. {
  616. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  617. EventData* userDataPtr = (EventData*)userData;
  618. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt8_HexInt8);
  619. userDataPtr[0].Size = (uint)(sizeof(byte) );
  620. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  621. }
  622. return status;
  623. }
  624. internal unsafe bool TemplateT_INT16(
  625. ref EventDescriptor eventDescriptor,
  626. short Prop_Int16
  627. )
  628. {
  629. int argumentCount = 1;
  630. bool status = true;
  631. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  632. {
  633. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  634. EventData* userDataPtr = (EventData*)userData;
  635. userDataPtr[0].DataPointer = (UInt64)(&Prop_Int16);
  636. userDataPtr[0].Size = (uint)(sizeof(short) );
  637. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  638. }
  639. return status;
  640. }
  641. internal unsafe bool TemplateT_UINT16(
  642. ref EventDescriptor eventDescriptor,
  643. ushort Prop_UInt16
  644. )
  645. {
  646. int argumentCount = 1;
  647. bool status = true;
  648. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  649. {
  650. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  651. EventData* userDataPtr = (EventData*)userData;
  652. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt16);
  653. userDataPtr[0].Size = (uint)(sizeof(short) );
  654. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  655. }
  656. return status;
  657. }
  658. internal unsafe bool TemplateT_UINT16_HexInt16(
  659. ref EventDescriptor eventDescriptor,
  660. ushort Prop_UInt16_HexInt16
  661. )
  662. {
  663. int argumentCount = 1;
  664. bool status = true;
  665. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  666. {
  667. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  668. EventData* userDataPtr = (EventData*)userData;
  669. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt16_HexInt16);
  670. userDataPtr[0].Size = (uint)(sizeof(short) );
  671. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  672. }
  673. return status;
  674. }
  675. internal unsafe bool TemplateT_INT32(
  676. ref EventDescriptor eventDescriptor,
  677. int Prop_Int32
  678. )
  679. {
  680. int argumentCount = 1;
  681. bool status = true;
  682. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  683. {
  684. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  685. EventData* userDataPtr = (EventData*)userData;
  686. userDataPtr[0].DataPointer = (UInt64)(&Prop_Int32);
  687. userDataPtr[0].Size = (uint)(sizeof(int) );
  688. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  689. }
  690. return status;
  691. }
  692. internal unsafe bool TemplateT_UINT32(
  693. ref EventDescriptor eventDescriptor,
  694. uint Prop_Uint32
  695. )
  696. {
  697. int argumentCount = 1;
  698. bool status = true;
  699. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  700. {
  701. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  702. EventData* userDataPtr = (EventData*)userData;
  703. userDataPtr[0].DataPointer = (UInt64)(&Prop_Uint32);
  704. userDataPtr[0].Size = (uint)(sizeof(int) );
  705. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  706. }
  707. return status;
  708. }
  709. internal unsafe bool TemplateT_UINT32_PID(
  710. ref EventDescriptor eventDescriptor,
  711. uint Prop_UInt32_Pid
  712. )
  713. {
  714. int argumentCount = 1;
  715. bool status = true;
  716. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  717. {
  718. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  719. EventData* userDataPtr = (EventData*)userData;
  720. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt32_Pid);
  721. userDataPtr[0].Size = (uint)(sizeof(int) );
  722. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  723. }
  724. return status;
  725. }
  726. internal unsafe bool TemplateT_UINT32_TID(
  727. ref EventDescriptor eventDescriptor,
  728. uint Prop_Uint32_Tid
  729. )
  730. {
  731. int argumentCount = 1;
  732. bool status = true;
  733. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  734. {
  735. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  736. EventData* userDataPtr = (EventData*)userData;
  737. userDataPtr[0].DataPointer = (UInt64)(&Prop_Uint32_Tid);
  738. userDataPtr[0].Size = (uint)(sizeof(int) );
  739. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  740. }
  741. return status;
  742. }
  743. internal unsafe bool TemplateT_UINT32_IPV4(
  744. ref EventDescriptor eventDescriptor,
  745. uint Prop_Uint32_IPV4
  746. )
  747. {
  748. int argumentCount = 1;
  749. bool status = true;
  750. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  751. {
  752. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  753. EventData* userDataPtr = (EventData*)userData;
  754. userDataPtr[0].DataPointer = (UInt64)(&Prop_Uint32_IPV4);
  755. userDataPtr[0].Size = (uint)(sizeof(int) );
  756. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  757. }
  758. return status;
  759. }
  760. internal unsafe bool TemplateT_UINT32_ERRORCODE(
  761. ref EventDescriptor eventDescriptor,
  762. uint Prop_Uint32_ERRORCODE
  763. )
  764. {
  765. int argumentCount = 1;
  766. bool status = true;
  767. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  768. {
  769. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  770. EventData* userDataPtr = (EventData*)userData;
  771. userDataPtr[0].DataPointer = (UInt64)(&Prop_Uint32_ERRORCODE);
  772. userDataPtr[0].Size = (uint)(sizeof(int) );
  773. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  774. }
  775. return status;
  776. }
  777. internal unsafe bool TemplateT_UINT32_HEXINT32(
  778. ref EventDescriptor eventDescriptor,
  779. uint Prop_Uint32_HEXINT32
  780. )
  781. {
  782. int argumentCount = 1;
  783. bool status = true;
  784. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  785. {
  786. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  787. EventData* userDataPtr = (EventData*)userData;
  788. userDataPtr[0].DataPointer = (UInt64)(&Prop_Uint32_HEXINT32);
  789. userDataPtr[0].Size = (uint)(sizeof(int) );
  790. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  791. }
  792. return status;
  793. }
  794. internal unsafe bool TemplateT_INT64(
  795. ref EventDescriptor eventDescriptor,
  796. long Prop_Int64
  797. )
  798. {
  799. int argumentCount = 1;
  800. bool status = true;
  801. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  802. {
  803. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  804. EventData* userDataPtr = (EventData*)userData;
  805. userDataPtr[0].DataPointer = (UInt64)(&Prop_Int64);
  806. userDataPtr[0].Size = (uint)(sizeof(long) );
  807. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  808. }
  809. return status;
  810. }
  811. internal unsafe bool TemplateT_UINT64(
  812. ref EventDescriptor eventDescriptor,
  813. ulong Prop_UInt64
  814. )
  815. {
  816. int argumentCount = 1;
  817. bool status = true;
  818. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  819. {
  820. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  821. EventData* userDataPtr = (EventData*)userData;
  822. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt64);
  823. userDataPtr[0].Size = (uint)(sizeof(long) );
  824. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  825. }
  826. return status;
  827. }
  828. internal unsafe bool TemplateT_UINT64_HEXInt64(
  829. ref EventDescriptor eventDescriptor,
  830. ulong Prop_UInt64_HEXInt64
  831. )
  832. {
  833. int argumentCount = 1;
  834. bool status = true;
  835. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  836. {
  837. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  838. EventData* userDataPtr = (EventData*)userData;
  839. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt64_HEXInt64);
  840. userDataPtr[0].Size = (uint)(sizeof(long) );
  841. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  842. }
  843. return status;
  844. }
  845. internal unsafe bool TemplateT_FLOAT(
  846. ref EventDescriptor eventDescriptor,
  847. float Prop_Float
  848. )
  849. {
  850. int argumentCount = 1;
  851. bool status = true;
  852. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  853. {
  854. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  855. EventData* userDataPtr = (EventData*)userData;
  856. userDataPtr[0].DataPointer = (UInt64)(&Prop_Float);
  857. userDataPtr[0].Size = (uint)(sizeof(float) );
  858. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  859. }
  860. return status;
  861. }
  862. internal unsafe bool TemplateT_DOUBLE(
  863. ref EventDescriptor eventDescriptor,
  864. double Prop_Double
  865. )
  866. {
  867. int argumentCount = 1;
  868. bool status = true;
  869. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  870. {
  871. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  872. EventData* userDataPtr = (EventData*)userData;
  873. userDataPtr[0].DataPointer = (UInt64)(&Prop_Double);
  874. userDataPtr[0].Size = (uint)(sizeof(double) );
  875. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  876. }
  877. return status;
  878. }
  879. internal unsafe bool TemplateT_BOOL(
  880. ref EventDescriptor eventDescriptor,
  881. bool Prop_Bool
  882. )
  883. {
  884. int argumentCount = 1;
  885. bool status = true;
  886. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  887. {
  888. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  889. EventData* userDataPtr = (EventData*)userData;
  890. int Prop_BoolInt = Prop_Bool ? 1 : 0;
  891. userDataPtr[0].DataPointer = (UInt64)(&Prop_BoolInt);
  892. userDataPtr[0].Size = (uint)(sizeof(int));
  893. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  894. }
  895. return status;
  896. }
  897. internal unsafe bool TemplateT_GUID(
  898. ref EventDescriptor eventDescriptor,
  899. Guid Prop_Guid
  900. )
  901. {
  902. int argumentCount = 1;
  903. bool status = true;
  904. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  905. {
  906. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  907. EventData* userDataPtr = (EventData*)userData;
  908. userDataPtr[0].DataPointer = (UInt64)(&Prop_Guid);
  909. userDataPtr[0].Size = (uint)(sizeof(Guid) );
  910. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  911. }
  912. return status;
  913. }
  914. internal unsafe bool TemplateT_POINTER(
  915. ref EventDescriptor eventDescriptor,
  916. IntPtr Prop_Pointer
  917. )
  918. {
  919. int argumentCount = 1;
  920. bool status = true;
  921. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  922. {
  923. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  924. EventData* userDataPtr = (EventData*)userData;
  925. userDataPtr[0].DataPointer = (UInt64)(&Prop_Pointer);
  926. userDataPtr[0].Size = (uint)(sizeof(IntPtr) );
  927. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  928. }
  929. return status;
  930. }
  931. internal unsafe bool TemplateT_FILETIME(
  932. ref EventDescriptor eventDescriptor,
  933. DateTime Prop_FileTime
  934. )
  935. {
  936. int argumentCount = 1;
  937. bool status = true;
  938. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  939. {
  940. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  941. EventData* userDataPtr = (EventData*)userData;
  942. long Prop_FileTimeFileTime = Prop_FileTime.ToFileTime();
  943. userDataPtr[0].DataPointer = (UInt64)(&Prop_FileTimeFileTime);
  944. userDataPtr[0].Size = (uint)(sizeof(long));
  945. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  946. }
  947. return status;
  948. }
  949. internal unsafe bool TemplateT_SID(
  950. ref EventDescriptor eventDescriptor,
  951. SecurityIdentifier Prop_SID
  952. )
  953. {
  954. int argumentCount = 1;
  955. bool status = true;
  956. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  957. {
  958. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  959. EventData* userDataPtr = (EventData*)userData;
  960. byte [] Prop_SIDBin = new byte[Prop_SID.BinaryLength];
  961. Prop_SID.GetBinaryForm(Prop_SIDBin, 0);
  962. userDataPtr[0].Size = (uint)(Prop_SID.BinaryLength);
  963. fixed (byte* a0 = Prop_SIDBin)
  964. {
  965. userDataPtr[0].DataPointer = (ulong)a0;
  966. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  967. }
  968. }
  969. return status;
  970. }
  971. internal unsafe bool TemplateT_ParamLength_UnicodeString(
  972. ref EventDescriptor eventDescriptor,
  973. uint Prop_ParamLength_UnicodString_Length,
  974. string Prop_ParamLength_UnicodeString
  975. )
  976. {
  977. int argumentCount = 2;
  978. bool status = true;
  979. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  980. {
  981. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  982. EventData* userDataPtr = (EventData*)userData;
  983. userDataPtr[0].DataPointer = (UInt64)(&Prop_ParamLength_UnicodString_Length);
  984. userDataPtr[0].Size = (uint)(sizeof(int) );
  985. userDataPtr[1].Size = (uint)(sizeof(char)*Prop_ParamLength_UnicodString_Length);
  986. fixed (char* a0 = Prop_ParamLength_UnicodeString)
  987. {
  988. userDataPtr[1].DataPointer = (ulong)a0;
  989. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  990. }
  991. }
  992. return status;
  993. }
  994. internal unsafe bool TemplateT_Alignment_UInt8_UnicodeString(
  995. ref EventDescriptor eventDescriptor,
  996. byte Prop_Alignment_UInt8_UnicodeString_1,
  997. string Prop_Alignment_UInt8_UnicodeString_2
  998. )
  999. {
  1000. int argumentCount = 2;
  1001. bool status = true;
  1002. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1003. {
  1004. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1005. EventData* userDataPtr = (EventData*)userData;
  1006. userDataPtr[0].DataPointer = (UInt64)(&Prop_Alignment_UInt8_UnicodeString_1);
  1007. userDataPtr[0].Size = (uint)(sizeof(byte) );
  1008. userDataPtr[1].Size = (uint)(Prop_Alignment_UInt8_UnicodeString_2.Length + 1)*sizeof(char);
  1009. fixed (char* a0 = Prop_Alignment_UInt8_UnicodeString_2)
  1010. {
  1011. userDataPtr[1].DataPointer = (ulong)a0;
  1012. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1013. }
  1014. }
  1015. return status;
  1016. }
  1017. internal unsafe bool TemplateT_ValueMap_UInt8(
  1018. ref EventDescriptor eventDescriptor,
  1019. byte Prop_ValueMap_Uint8
  1020. )
  1021. {
  1022. int argumentCount = 1;
  1023. bool status = true;
  1024. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1025. {
  1026. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1027. EventData* userDataPtr = (EventData*)userData;
  1028. userDataPtr[0].DataPointer = (UInt64)(&Prop_ValueMap_Uint8);
  1029. userDataPtr[0].Size = (uint)(sizeof(byte) );
  1030. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1031. }
  1032. return status;
  1033. }
  1034. internal unsafe bool TemplateT_BitMap_UInt8(
  1035. ref EventDescriptor eventDescriptor,
  1036. byte Prop_BitMap_Uint8
  1037. )
  1038. {
  1039. int argumentCount = 1;
  1040. bool status = true;
  1041. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1042. {
  1043. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1044. EventData* userDataPtr = (EventData*)userData;
  1045. userDataPtr[0].DataPointer = (UInt64)(&Prop_BitMap_Uint8);
  1046. userDataPtr[0].Size = (uint)(sizeof(byte) );
  1047. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1048. }
  1049. return status;
  1050. }
  1051. internal unsafe bool TemplateT_UInt32_Win32Error(
  1052. ref EventDescriptor eventDescriptor,
  1053. uint Prop_UInt32_Win32Error
  1054. )
  1055. {
  1056. int argumentCount = 1;
  1057. bool status = true;
  1058. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1059. {
  1060. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1061. EventData* userDataPtr = (EventData*)userData;
  1062. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt32_Win32Error);
  1063. userDataPtr[0].Size = (uint)(sizeof(int) );
  1064. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1065. }
  1066. return status;
  1067. }
  1068. internal unsafe bool TemplateT_UInt32_NTSTATUS(
  1069. ref EventDescriptor eventDescriptor,
  1070. uint Prop_UInt32_NTSTATUS
  1071. )
  1072. {
  1073. int argumentCount = 1;
  1074. bool status = true;
  1075. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1076. {
  1077. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1078. EventData* userDataPtr = (EventData*)userData;
  1079. userDataPtr[0].DataPointer = (UInt64)(&Prop_UInt32_NTSTATUS);
  1080. userDataPtr[0].Size = (uint)(sizeof(int) );
  1081. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1082. }
  1083. return status;
  1084. }
  1085. internal unsafe bool TemplateT_Int32_HResult(
  1086. ref EventDescriptor eventDescriptor,
  1087. int Prop_Int32_HResult
  1088. )
  1089. {
  1090. int argumentCount = 1;
  1091. bool status = true;
  1092. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1093. {
  1094. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1095. EventData* userDataPtr = (EventData*)userData;
  1096. userDataPtr[0].DataPointer = (UInt64)(&Prop_Int32_HResult);
  1097. userDataPtr[0].Size = (uint)(sizeof(int) );
  1098. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1099. }
  1100. return status;
  1101. }
  1102. internal unsafe bool TemplateT_FixedCount_Int8(
  1103. ref EventDescriptor eventDescriptor,
  1104. sbyte[] Prop_FixedCount_Int8
  1105. )
  1106. {
  1107. int argumentCount = 1;
  1108. bool status = true;
  1109. if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
  1110. {
  1111. byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
  1112. EventData* userDataPtr = (EventData*)userData;
  1113. userDataPtr[0].Size = (uint)(sizeof(byte)*15);
  1114. fixed (sbyte* a0 = Prop_FixedCount_Int8)
  1115. {
  1116. userDataPtr[0].DataPointer = (ulong)a0;
  1117. status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
  1118. }
  1119. }
  1120. return status;
  1121. }
  1122. }
  1123. }