Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
6.7 KiB

  1. // ConstantMap.cpp: implementation of the CConstantMap class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #pragma warning (disable : 4786)
  6. #pragma warning (disable : 4275)
  7. #include <iostream>
  8. #include <fstream>
  9. #include <string>
  10. #include <map>
  11. #include <list>
  12. using namespace std;
  13. #include <tchar.h>
  14. #include <windows.h>
  15. #ifdef NONNT5
  16. typedef unsigned long ULONG_PTR;
  17. #endif
  18. #include <wmistr.h>
  19. #include <guiddef.h>
  20. #include <initguid.h>
  21. #include <evntrace.h>
  22. #include <WTYPES.H>
  23. #include "t_string.h"
  24. #include "ConstantMap.h"
  25. #include "Utilities.h"
  26. #include "Persistor.h"
  27. #include "StructureWrappers.h"
  28. //////////////////////////////////////////////////////////////////////
  29. // Construction/Destruction
  30. //////////////////////////////////////////////////////////////////////
  31. CConstantMap::CConstantMap()
  32. {
  33. MAPPAIR pair;
  34. pair.first = _T("EVENT_TRACE_TYPE_INFO");
  35. pair.second = EVENT_TRACE_TYPE_INFO;
  36. m_Map.insert(pair);
  37. pair.first = _T("EVENT_TRACE_TYPE_START");
  38. pair.second = EVENT_TRACE_TYPE_START;
  39. m_Map.insert(pair);
  40. pair.first = _T("EVENT_TRACE_TYPE_END");
  41. pair.second = EVENT_TRACE_TYPE_END;
  42. m_Map.insert(pair);
  43. pair.first = _T("EVENT_TRACE_TYPE_DC_START");
  44. pair.second = EVENT_TRACE_TYPE_DC_START;
  45. m_Map.insert(pair);
  46. pair.first = _T("EVENT_TRACE_TYPE_DC_END");
  47. pair.second = EVENT_TRACE_TYPE_DC_END;
  48. m_Map.insert(pair);
  49. pair.first = _T("EVENT_TRACE_TYPE_EXTENSION");
  50. pair.second = EVENT_TRACE_TYPE_EXTENSION;
  51. m_Map.insert(pair);
  52. pair.first = _T("EVENT_TRACE_TYPE_REPLY");
  53. pair.second = EVENT_TRACE_TYPE_REPLY;
  54. m_Map.insert(pair);
  55. pair.first = _T("EVENT_TRACE_TYPE_RESERVED7");
  56. pair.second = EVENT_TRACE_TYPE_RESERVED7;
  57. m_Map.insert(pair);
  58. pair.first = _T("EVENT_TRACE_TYPE_RESERVED8");
  59. pair.second = EVENT_TRACE_TYPE_RESERVED8;
  60. m_Map.insert(pair);
  61. pair.first = _T("EVENT_TRACE_TYPE_RESERVED9");
  62. pair.second = EVENT_TRACE_TYPE_RESERVED9;
  63. m_Map.insert(pair);
  64. pair.first = _T("EVENT_TRACE_TYPE_LOAD");
  65. pair.second = EVENT_TRACE_TYPE_LOAD;
  66. m_Map.insert(pair);
  67. pair.first = _T("EVENT_TRACE_TYPE_IO_READ");
  68. pair.second = EVENT_TRACE_TYPE_IO_READ;
  69. m_Map.insert(pair);
  70. pair.first = _T("EVENT_TRACE_TYPE_IO_WRITE");
  71. pair.second = EVENT_TRACE_TYPE_IO_WRITE;
  72. m_Map.insert(pair);
  73. pair.first = _T("EVENT_TRACE_TYPE_MM_TF");
  74. pair.second = EVENT_TRACE_TYPE_MM_TF;
  75. m_Map.insert(pair);
  76. pair.first = _T("EVENT_TRACE_TYPE_MM_DZF");
  77. pair.second = EVENT_TRACE_TYPE_MM_DZF;
  78. m_Map.insert(pair);
  79. pair.first = _T("EVENT_TRACE_TYPE_MM_COW");
  80. pair.second = EVENT_TRACE_TYPE_MM_COW;
  81. m_Map.insert(pair);
  82. pair.first = _T("EVENT_TRACE_TYPE_MM_GPF");
  83. pair.second = EVENT_TRACE_TYPE_MM_GPF;
  84. m_Map.insert(pair);
  85. pair.first = _T("EVENT_TRACE_TYPE_MM_HPF");
  86. pair.second = EVENT_TRACE_TYPE_MM_HPF;
  87. m_Map.insert(pair);
  88. pair.first = _T("EVENT_TRACE_TYPE_SEND");
  89. pair.second = EVENT_TRACE_TYPE_SEND;
  90. m_Map.insert(pair);
  91. pair.first = _T("EVENT_TRACE_TYPE_MM_HPF");
  92. pair.second = EVENT_TRACE_TYPE_MM_HPF;
  93. m_Map.insert(pair);
  94. pair.first = _T("EVENT_TRACE_TYPE_RECEIVE");
  95. pair.second = EVENT_TRACE_TYPE_RECEIVE;
  96. m_Map.insert(pair);
  97. pair.first = _T("EVENT_TRACE_TYPE_CONNECT");
  98. pair.second = EVENT_TRACE_TYPE_CONNECT;
  99. m_Map.insert(pair);
  100. pair.first = _T("EVENT_TRACE_TYPE_DISCONNECT");
  101. pair.second = EVENT_TRACE_TYPE_DISCONNECT;
  102. m_Map.insert(pair);
  103. pair.first = _T("EVENT_TRACE_TYPE_GUIDMAP");
  104. pair.second = EVENT_TRACE_TYPE_GUIDMAP;
  105. m_Map.insert(pair);
  106. pair.first = _T("EVENT_TRACE_TYPE_CONFIG");
  107. pair.second = EVENT_TRACE_TYPE_CONFIG;
  108. m_Map.insert(pair);
  109. pair.first = _T("EVENT_TRACE_TYPE_SIDINFO");
  110. pair.second = EVENT_TRACE_TYPE_SIDINFO;
  111. m_Map.insert(pair);
  112. pair.first = _T("EVENT_TRACE_FLAG_PROCESS");
  113. pair.second = EVENT_TRACE_FLAG_PROCESS;
  114. m_Map.insert(pair);
  115. pair.first = _T("EVENT_TRACE_FLAG_THREAD");
  116. pair.second = EVENT_TRACE_FLAG_THREAD;
  117. m_Map.insert(pair);
  118. pair.first = _T("EVENT_TRACE_FLAG_IMAGE_LOAD");
  119. pair.second = EVENT_TRACE_FLAG_IMAGE_LOAD;
  120. m_Map.insert(pair);
  121. pair.first = _T("EVENT_TRACE_FLAG_DISK_IO");
  122. pair.second = EVENT_TRACE_FLAG_DISK_IO;
  123. m_Map.insert(pair);
  124. pair.first = _T("EVENT_TRACE_FLAG_DISK_FILE_IO");
  125. pair.second = EVENT_TRACE_FLAG_DISK_FILE_IO;
  126. m_Map.insert(pair);
  127. pair.first = _T("EVENT_TRACE_FLAG_MEMORY_PAGE_FAULTS");
  128. pair.second = EVENT_TRACE_FLAG_MEMORY_PAGE_FAULTS;
  129. m_Map.insert(pair);
  130. pair.first = _T("EVENT_TRACE_FLAG_MEMORY_HARD_FAULTS");
  131. pair.second = EVENT_TRACE_FLAG_MEMORY_HARD_FAULTS;
  132. m_Map.insert(pair);
  133. pair.first = _T("EVENT_TRACE_FLAG_NETWORK_TCPIP");
  134. pair.second = EVENT_TRACE_FLAG_NETWORK_TCPIP;
  135. m_Map.insert(pair);
  136. pair.first = _T("EVENT_TRACE_FLAG_EXTENSION");
  137. pair.second = EVENT_TRACE_FLAG_EXTENSION;
  138. m_Map.insert(pair);
  139. pair.first = _T("EVENT_TRACE_FLAG_FORWARD_WMI");
  140. pair.second = EVENT_TRACE_FLAG_FORWARD_WMI;
  141. m_Map.insert(pair);
  142. pair.first = _T("EVENT_TRACE_FILE_MODE_NONE");
  143. pair.second = EVENT_TRACE_FILE_MODE_NONE;
  144. m_Map.insert(pair);
  145. pair.first = _T("EVENT_TRACE_FILE_MODE_SEQUENTIAL");
  146. pair.second = EVENT_TRACE_FILE_MODE_SEQUENTIAL;
  147. m_Map.insert(pair);
  148. pair.first = _T("EVENT_TRACE_FILE_MODE_CIRCULAR");
  149. pair.second = EVENT_TRACE_FILE_MODE_CIRCULAR;
  150. m_Map.insert(pair);
  151. pair.first = _T("EVENT_TRACE_FILE_MODE_NEWFILE");
  152. pair.second = EVENT_TRACE_FILE_MODE_NEWFILE;
  153. m_Map.insert(pair);
  154. pair.first = _T("EVENT_TRACE_PRIVATE_LOGGER_MODE");
  155. pair.second = EVENT_TRACE_PRIVATE_LOGGER_MODE;
  156. m_Map.insert(pair);
  157. pair.first = _T("EVENT_TRACE_REAL_TIME_MODE");
  158. pair.second = EVENT_TRACE_REAL_TIME_MODE;
  159. m_Map.insert(pair);
  160. pair.first = _T("EVENT_TRACE_DELAY_OPEN_FILE_MODE");
  161. pair.second = EVENT_TRACE_DELAY_OPEN_FILE_MODE;
  162. m_Map.insert(pair);
  163. pair.first = _T("EVENT_TRACE_BUFFERING_MODE");
  164. pair.second = EVENT_TRACE_BUFFERING_MODE;
  165. m_Map.insert(pair);
  166. pair.first = _T("EVENT_TRACE_CONTROL_QUERY");
  167. pair.second = EVENT_TRACE_CONTROL_QUERY;
  168. m_Map.insert(pair);
  169. pair.first = _T("EVENT_TRACE_CONTROL_STOP");
  170. pair.second = EVENT_TRACE_CONTROL_STOP;
  171. m_Map.insert(pair);
  172. pair.first = _T("EVENT_TRACE_CONTROL_UPDATE");
  173. pair.second = EVENT_TRACE_CONTROL_UPDATE;
  174. m_Map.insert(pair);
  175. pair.first = _T("WNODE_FLAG_TRACED_GUID");
  176. pair.second = WNODE_FLAG_TRACED_GUID;
  177. m_Map.insert(pair);
  178. pair.first = _T("ERROR_SUCCESS");
  179. pair.second = ERROR_SUCCESS;
  180. m_Map.insert(pair);
  181. pair.first = _T("ERROR_INVALID_PARAMETER");
  182. pair.second = ERROR_INVALID_PARAMETER;
  183. m_Map.insert(pair);
  184. pair.first = _T("ERROR_INVALID_NAME");
  185. pair.second = ERROR_INVALID_NAME;
  186. m_Map.insert(pair);
  187. pair.first = _T("ERROR_BAD_LENGTH");
  188. pair.second = ERROR_BAD_LENGTH;
  189. m_Map.insert(pair);
  190. pair.first = _T("VALUE_NULL");
  191. pair.second = NULL;
  192. m_Map.insert(pair);
  193. pair.first = _T("VALUE_MAX_MEMORY");
  194. pair.second = 0;
  195. m_Map.insert(pair);
  196. pair.first = _T("VALUE_ZERO");
  197. pair.second = 0;
  198. m_Map.insert(pair);
  199. }
  200. CConstantMap::~CConstantMap()
  201. {
  202. }