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.

64 lines
1.6 KiB

  1. /****************************************************************************
  2. Copyright information : Copyright (c) 1998-1999 Microsoft Corporation
  3. File Name : WMICliLog.h
  4. Project Name : WMI Command Line
  5. Author Name : Ch. Sriramachandramurthy
  6. Date of Creation (dd/mm/yy) : 4th-October-2000
  7. Version Number : 1.0
  8. Revision History :
  9. Last Modified By : Ch. Sriramachandramurthy
  10. Last Modified Date : 18th-November-2000
  11. ****************************************************************************/
  12. // WMICliLog.h : header file
  13. //
  14. /*-------------------------------------------------------------------
  15. Class Name : CWMICliLog
  16. Class Type : Concrete
  17. Brief Description : This class encapsulates the functionality needed
  18. for logging the input and output
  19. Super Classes : None
  20. Sub Classes : None
  21. Classes Used : None
  22. Interfaces Used : None
  23. --------------------------------------------------------------------*/
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CWMICliLog
  26. class CWMICliLog
  27. {
  28. public:
  29. // Construction
  30. CWMICliLog();
  31. // Destruction
  32. ~CWMICliLog();
  33. // Restrict Assignment
  34. CWMICliLog& operator=(CWMICliLog& rWmiCliLog);
  35. // Attributes
  36. private:
  37. //the log file
  38. _TCHAR* m_pszLogFile;
  39. //handle to the log file
  40. HANDLE m_hFile;
  41. //status of whether the file has to created or not
  42. BOOL m_bCreate;
  43. // Operations
  44. private:
  45. //Creates the Log File
  46. void CreateLogFile();
  47. public:
  48. //write in to the log file
  49. void WriteToLog(LPSTR pszInput);
  50. //sets the Log File Path
  51. void SetLogFilePath(_TCHAR*);
  52. //Close the Log File
  53. void CloseLogFile();
  54. };