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.

283 lines
7.0 KiB

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