- buildcomserversindotnet_src.zip
- CSharpExeCOMServers
- IDotNetClassFactory
- clients
- CPPClient01
- implementations
- IDotNetClassFactory_Impl01
- interfaces
- IDotNetClassFactory
- testobjects
- implementations
- ITestCSharpObjectInterfacesImpl01
- interface
- ITestCSharpObjectInterfaces
- ManagedCOMLocalServer
- clients
- CPPClient01
- implementations
- ManagedCOMLocalServer_Impl01
- UsingStandardCOMInterop
- clients
- CPP
- CPPClient01
- implementations
- SimpleCOMObject_CSharpExeImpl
- SimpleCOMObject
- clients
- CPP
- CPPClient01
- VB
- VBClient01
- FormMain.frm
- MSSCCPRJ.SCC
- VBClient01.exe
- VBClient01.vbp
- VBClient01.vbw
- implementations
- C#
- SimpleCOMObject_CSharpImpl
- CPP
- SimpleCOMObject_CPPImpl
- interfaces
- SimpleCOMObject
|
// SimpleCOMObject_.h : Declaration of the CSimpleCOMObject
#pragma once
#include "resource.h" // main symbols
#include "SimpleCOMObject.h"
#include "_ISimpleCOMObjectEvents_CP.h"
// CSimpleCOMObject
class ATL_NO_VTABLE CSimpleCOMObject :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CSimpleCOMObject, &CLSID_SimpleCOMObject>,
public ISupportErrorInfo,
public IConnectionPointContainerImpl<CSimpleCOMObject>,
public CProxy_ISimpleCOMObjectEvents<CSimpleCOMObject>,
public IDispatchImpl<ISimpleCOMObject, &IID_ISimpleCOMObject, &LIBID_SimpleCOMObjectLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CSimpleCOMObject()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_SIMPLECOMOBJECT1)
BEGIN_COM_MAP(CSimpleCOMObject)
COM_INTERFACE_ENTRY(ISimpleCOMObject)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
END_COM_MAP()
BEGIN_CONNECTION_POINT_MAP(CSimpleCOMObject)
CONNECTION_POINT_ENTRY(__uuidof(_ISimpleCOMObjectEvents))
END_CONNECTION_POINT_MAP()
// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
STDMETHOD(get_LongProperty)(LONG* pVal);
STDMETHOD(put_LongProperty)(LONG newVal);
STDMETHOD(Method01)(BSTR strMessage);
};
OBJECT_ENTRY_AUTO(__uuidof(SimpleCOMObject), CSimpleCOMObject)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Lim Bio Liong is a Specialist at a leading Software House in Singapore.
Bio has been in software development for over 10 years. He specialises in C/C++ programming and Windows software development.
Bio has also done device-driver development and enjoys low-level programming. Bio has recently picked up C# programming and has been researching in this area.