컴포넌트(COM)/Aggregation
-
ATL로 Aggregation 구현하기컴포넌트(COM)/Aggregation 2008. 11. 27. 00:09
[ object, uuid(0672F710-52C8-4B5E-8942-61C354AAB91A), dual, helpstring("IRadius Interface"), pointer_default(unique) ] interface IRadius : IDispatch { [id(1), helpstring("method Radius")] HRESULT Radius([in] int x, [in] int y, [out, retval] double *z); }; [ object, uuid(1F37A7CC-582F-4A1D-9316-AE95F03E6860), dual, helpstring("ISimpleCalc Interface"), pointer_default(unique) ] interface ISimpleCa..
-
MFC로 Aggregation 구현하기컴포넌트(COM)/Aggregation 2008. 11. 26. 23:11
DECLARE_INTERFACE_(ISimpleCal, IUnknown) { STDMETHOD_(int, Sum)() PURE; STDMETHOD_(int, Sub)() PURE; }; DECLARE_INTERFACE_(IRadius, IUnknown) { STDMETHOD(Radius)(int x, int y, double* z) PURE; }; #include "Interface.h" class CSimpleCal2 : public CCmdTarget { ... // Attributes public: IUnknown* m_pAgrUnknown; ... // Implementation protected: virtual BOOL OnCreateAggregates(); virtual ~CSimpleCal2..
-
C++로 Aggregation 구현하기컴포넌트(COM)/Aggregation 2008. 11. 26. 22:18
#include interface ICalcu : IUnknown { virtual int __stdcall Sum(int x, int y) = 0; virtual int __stdcall Sub(int x, int y) = 0; virtual int __stdcall Mul(int x, int y) = 0; virtual double __stdcall Div(int x, int y) = 0; }; interface IRadius : IUnknown { virtual double __stdcall Radius(int x, int y) = 0; }; HRESULT __stdcall CFactory::CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void..