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.

90 lines
2.0 KiB

  1. // Utilities.h: interface for the CUtilities class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. //***************************************************************************
  5. //
  6. // judyp May 1999
  7. //
  8. //***************************************************************************
  9. #if !defined(AFX_UTILITIES_H__C37E8DD0_ED3E_11D2_804A_009027345EE2__INCLUDED_)
  10. #define AFX_UTILITIES_H__C37E8DD0_ED3E_11D2_804A_009027345EE2__INCLUDED_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif // _MSC_VER > 1000
  14. TCHAR *NewTCHAR(const TCHAR *ptcToCopy);
  15. LPSTR NewLPSTR(LPCWSTR lpwstrToCopy);
  16. LPWSTR NewLPWSTR(LPCSTR lpstrToCopy);
  17. LPTSTR DecodeStatus(IN ULONG Status);
  18. int GetFileList(LPTSTR lptstrPath, LPTSTR lptstrFileType, list<t_string> &rList);
  19. BOOL IsAdmin(); // From Q118626
  20. LPTSTR LPTSTRFromGuid(GUID Guid);
  21. t_string ULONGVarToTString(ULONG ul, bool bHex);
  22. ULONG InitializePropsArray
  23. (PEVENT_TRACE_PROPERTIES &pPropsArray, int nInstances);
  24. ULONG FreePropsArray
  25. (PEVENT_TRACE_PROPERTIES &pPropsArray, int nInstances);
  26. int LogDetailBeforeCall
  27. ( CLogger *pDetailLogger,
  28. TCOData *pstructTCOData,
  29. BOOL bAdmin
  30. );
  31. int LogDetailAfterCall
  32. ( CLogger *pDetailLogger,
  33. TCOData *pstructTCOData,
  34. PEVENT_TRACE_PROPERTIES *pProps,
  35. ULONG ulResult,
  36. LPTSTR lpstrReturnedError,
  37. bool bValid,
  38. BOOL bAdmin,
  39. LPCTSTR lptstrBanner = NULL,
  40. bool bPrintProps = true
  41. );
  42. int LogSummaryBeforeCall
  43. (
  44. TCOData *pstructTCOData,
  45. LPCTSTR lpctstrDataFile,
  46. LPCTSTR lptstrAction,
  47. LPCTSTR lptstrAPI,
  48. bool bLogExpected
  49. );
  50. int LogSummaryAfterCall
  51. (
  52. TCOData *pstructTCOData,
  53. LPCTSTR lpctstrDataFile,
  54. LPCTSTR lptstrAction,
  55. ULONG ulActualResult,
  56. LPTSTR lptstrErrorDesc,
  57. bool bLogExpected // If true we log expected vs actual result.
  58. );
  59. int OpenLogFiles
  60. ( LPCTSTR lpctstrTCODetailFile,
  61. CLogger *&pDetailLogger,
  62. LPTSTR *plpstrReturnedError
  63. );
  64. bool LogPropsDiff
  65. ( CLogger *pDetailLogger,
  66. PEVENT_TRACE_PROPERTIES pProps1,
  67. PEVENT_TRACE_PROPERTIES pProps2
  68. );
  69. #define MAX_STR 1024
  70. #endif // !defined(AFX_UTILITIES_H__C37E8DD0_ED3E_11D2_804A_009027345EE2__INCLUDED_)