MyLog.h
上传用户:weisheen
上传日期:2022-07-09
资源大小:19390k
文件大小:1k
- // MyLog.h: interface for the MyLog class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MYLOG_H__C8090839_F8F1_4C23_8DE6_4FF1FF273B43__INCLUDED_)
- #define AFX_MYLOG_H__C8090839_F8F1_4C23_8DE6_4FF1FF273B43__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "../DemoIUnknown.h"
- class MyLog : public ILog//继承ILog
- {
- public:
- MyLog();
- virtual ~MyLog();
- STDMETHOD(writeLog)( BSTR message);
- //重写3个IUnknown的虚函数,原型为
- // virtual HRESULT STDMETHODCALLTYPE QueryInterface(
- // /* [in] */ REFIID riid,
- // /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;
- // virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0;
- // virtual ULONG STDMETHODCALLTYPE Release( void) = 0;
- //相关的宏
- //#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
- //#define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
- STDMETHOD(QueryInterface)(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject);
- STDMETHOD_(ULONG,AddRef)(void);
- STDMETHOD_(ULONG,Release)(void);
- private:
- ULONG ilisongtao;
- };
- #endif // !defined(AFX_MYLOG_H__C8090839_F8F1_4C23_8DE6_4FF1FF273B43__INCLUDED_)