Click here to Skip to main content
15,890,438 members
Home / Discussions / COM
   

COM

 
GeneralSafearray with byte data Pin
Anonymous24-Jul-02 4:09
Anonymous24-Jul-02 4:09 
GeneralRe: Safearray with byte data Pin
Vi224-Jul-02 4:20
Vi224-Jul-02 4:20 
GeneralRe: Safearray with byte data Pin
Anonymous24-Jul-02 5:53
Anonymous24-Jul-02 5:53 
GeneralPassing COM object as parameter to C++ function Pin
Tomaž Štih24-Jul-02 0:23
Tomaž Štih24-Jul-02 0:23 
GeneralRe: Passing COM object as parameter to C++ function Pin
Vi229-Jul-02 3:12
Vi229-Jul-02 3:12 
GeneralVARIANT and Byte Arrays Pin
Jose Fco Bonnin23-Jul-02 22:26
Jose Fco Bonnin23-Jul-02 22:26 
GeneralInside COM Pin
CaesarCZ23-Jul-02 12:09
CaesarCZ23-Jul-02 12:09 
GeneralPass a specific C++ object through COM server Pin
chrisl23-Jul-02 3:42
chrisl23-Jul-02 3:42 
OMG | :OMG:
Hi,
I'm a beginner in Com and I need help.
I don't manage to get my specific C++ object in my COM client.

I have a C++ DLL that contains this object :
Class CDDSR_MON;
I have a COM server that contains this coclass:

class ATL_NO_VTABLE CoDDSR_CORE
public:
CDDSR_MON * m_pDDSRCORE;
BEGIN_COM_MAP(CoDDSR_Monitoring)
COM_INTERFACE_ENTRY(IDDSR_Monitoring)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

I'd like to pass this pointer m_pDDSRCORE to my COM Client so I do that :

In my COM server :
STDMETHODIMP CoDDSR_CORE::getMonitoringInfo(IDDSR_Monitoring **mon){
CDDSR_Mon * ddsrMon;
IDDSR_Monitoring * iddsrMon;
HRESULT hr = ::CoCreateInstance(CLSID_DDSR_Monitoring, NULL,CLSCTX_LOCAL_SERVER,IID_IDDSR_Monitoring, (void**)&iddsrMon);
CComObject<coddsr_monitoring> *pmon;
HRESULT hRes = CComObject<coddsr_monitoring>::CreateInstance(&pmon);
pmon->m_pDDSRMonitoring = ddsrMon;
pmon->QueryInterface(IID_IDDSR_Monitoring, (void**)iddsrMon);
mon = iddsrMon;
return S_OK;
}

In my COM client :

CDDSR_Monitoring* ddsrMonitoring = NULL;
// Now we will intilize COM
hr = CoInitialize(0);

// Use the SUCCEEDED macro and see if we can get a pointer
// to the interface
if(SUCCEEDED(hr))
{
IDDSR_CORE* pDDSR_CORE;
hr = CoCreateInstance( CLSID_DDSR_CORE, NULL, CLSCTX_LOCAL_SERVER,
IID_IDDSR_CORE, (void**) &pDDSR_CORE);
if(SUCCEEDED(hr))
{
IDDSR_Monitoring* iMon;
hr = ::CoCreateInstance(CLSID_DDSR_Monitoring, NULL, CLSCTX_LOCAL_SERVER,IID_IDDSR_Monitoring, (void**) &iMon);
if(FAILED(hr))
pDDSR_CORE->getMonitoringInfo(&iMon);

}

// Uninitialize COM
CoUninitialize();
QuestionHow to disable script in my Browser Control Pin
rokia22-Jul-02 16:17
rokia22-Jul-02 16:17 
GeneralHELP: Composite Control Pin
minhhoang22-Jul-02 11:59
minhhoang22-Jul-02 11:59 
GeneralmsWord automation Pin
pnpfriend22-Jul-02 10:25
pnpfriend22-Jul-02 10:25 
GeneralEvent Sinking Interfaces Pin
QAU22-Jul-02 2:03
QAU22-Jul-02 2:03 
GeneralEvent Sinking Interfaces Pin
Anonymous22-Jul-02 2:02
Anonymous22-Jul-02 2:02 
GeneralThumbctl doesnt work. Pin
rokia21-Jul-02 17:18
rokia21-Jul-02 17:18 
GeneralRe: Thumbctl doesnt work. Pin
toon21-Jul-02 19:44
toon21-Jul-02 19:44 
GeneralThreaded COM object Pin
Jörgen Sigvardsson21-Jul-02 8:14
Jörgen Sigvardsson21-Jul-02 8:14 
GeneralRe: Threaded COM object Pin
Len Holgate21-Jul-02 12:10
Len Holgate21-Jul-02 12:10 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 12:19
Jörgen Sigvardsson21-Jul-02 12:19 
GeneralRe: Threaded COM object Pin
Jörgen Sigvardsson21-Jul-02 13:05
Jörgen Sigvardsson21-Jul-02 13:05 
QuestionHave I understood COM correctly? Pin
Paul Ingles20-Jul-02 13:47
Paul Ingles20-Jul-02 13:47 
AnswerRe: Have I understood COM correctly? Pin
Noam Ben Haim24-Jul-02 3:55
Noam Ben Haim24-Jul-02 3:55 
QuestionMFC to ATL ???? Pin
Leesen19-Jul-02 18:03
Leesen19-Jul-02 18:03 
AnswerRe: MFC to ATL ???? Pin
Not Active20-Jul-02 16:07
mentorNot Active20-Jul-02 16:07 
GeneralRe: MFC to ATL ???? Pin
Leesen22-Jul-02 18:30
Leesen22-Jul-02 18:30 
AnswerRe: MFC to ATL ???? Pin
Vivek Rajan22-Jul-02 18:52
Vivek Rajan22-Jul-02 18:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.