?? cmpnt.h
字號:
//
// Cmpnt.cpp - Component
//
#include "Iface.h"
#include "CUnknown.h"
///////////////////////////////////////////////////////////
//
// Component A
//
class CA : public CUnknown,
public IX,
public ISupportErrorInfo
{
public:
// Creation
static HRESULT CreateInstance(IUnknown* pUnknownOuter,
CUnknown** ppNewComponent ) ;
private:
// Declare the delegating IUnknown.
DECLARE_IUNKNOWN
// IUnknown
virtual HRESULT __stdcall NondelegatingQueryInterface(const IID& iid,
void** ppv) ;
// IDispatch
virtual HRESULT __stdcall GetTypeInfoCount(UINT* pCountTypeInfo) ;
virtual HRESULT __stdcall GetTypeInfo(
UINT iTypeInfo,
LCID, // Localization is not supported.
ITypeInfo** ppITypeInfo) ;
virtual HRESULT __stdcall GetIDsOfNames(
const IID& iid,
OLECHAR** arrayNames,
UINT countNames,
LCID, // Localization is not supported.
DISPID* arrayDispIDs) ;
virtual HRESULT __stdcall Invoke(
DISPID dispidMember,
const IID& iid,
LCID, // Localization is not supported.
WORD wFlags,
DISPPARAMS* pDispParams,
VARIANT* pvarResult,
EXCEPINFO* pExcepInfo,
UINT* pArgErr) ;
// Interface IX
virtual HRESULT __stdcall Fx() ;
virtual HRESULT __stdcall FxStringIn(BSTR bstrIn) ;
virtual HRESULT __stdcall FxStringOut(BSTR* pbstrOut) ;
virtual HRESULT __stdcall FxFakeError() ;
// ISupportErrorInfo
virtual HRESULT __stdcall InterfaceSupportsErrorInfo(const IID& riid)
{
return (riid == IID_IX) ? S_OK : S_FALSE ;
}
// Initialization
virtual HRESULT Init() ;
// Constructor
CA(IUnknown* pUnknownOuter) ;
// Destructor
~CA() ;
// Pointer to type information.
ITypeInfo* m_pITypeInfo ;
} ;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -