windows-nt/Source/XPSP1/NT/base/wmi/tests/logger/logger.h

33 lines
989 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#if !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)
#define AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_
//***************************************************************************
//
// judyp May 1999
//
//***************************************************************************
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CLogger
{
public:
CLogger(LPCTSTR lpctstrFileName, bool bAppend = true);
~CLogger();
int LogTCHAR(LPCTSTR lpctstrOut);
int LogULONG(ULONG uLong, bool bHex = true);
int LogULONG64(ULONG64 uLong64, bool bHex = true);
int LogGUID(GUID Guid);
int LogEventTraceProperties(PEVENT_TRACE_PROPERTIES pProps);
int LogTime(time_t &Time);
void Flush() {m_pPersistor->Stream().flush();}
HRESULT GetOpenStatus() {return m_hr;}
private:
CPersistor *m_pPersistor;
char *m_sFileName;
HRESULT m_hr;
};
#endif // !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)