Click here to Skip to main content
15,915,975 members
Home / Discussions / COM
   

COM

 
GeneralRe: How to Pass c++ object across ATL DLL Pin
annjose2426-Jan-06 16:33
annjose2426-Jan-06 16:33 
GeneralRe: How to Pass c++ object across ATL DLL Pin
Stephen Hewitt26-Jan-06 16:56
Stephen Hewitt26-Jan-06 16:56 
GeneralRe: How to Pass c++ object across ATL DLL Pin
annjose2426-Jan-06 17:07
annjose2426-Jan-06 17:07 
GeneralRe: How to Pass c++ object across ATL DLL Pin
Stephen Hewitt26-Jan-06 17:15
Stephen Hewitt26-Jan-06 17:15 
GeneralRe: How to Pass c++ object across ATL DLL Pin
annjose2426-Jan-06 17:25
annjose2426-Jan-06 17:25 
GeneralRe: How to Pass c++ object across ATL DLL Pin
Stephen Hewitt26-Jan-06 17:31
Stephen Hewitt26-Jan-06 17:31 
GeneralRe: How to Pass c++ object across ATL DLL Pin
annjose2426-Jan-06 18:15
annjose2426-Jan-06 18:15 
GeneralRe: How to Pass c++ object across ATL DLL Pin
Gizzo26-Jan-06 21:22
Gizzo26-Jan-06 21:22 
annjose24 wrote:
Now if i create an object of clsA say obj3, is it possible to passobj3 to the COM client.


The "clean" way to do that is implementing COM objects to expose the funcionality of clsA, clsB and clsC. So you will have IClsA implemented by clsA, IClsB implemented by clsB, and so on...
Then, instead of passing the object, you can pass the interface via COM. In your current COM object you need a method like:

(I suppose that you have a pointer to an object of type ClsA in your COM object called m_pClsa)

HRESULT CYourCOMObject::GetObjectClsA ( IClsA ** ppObjClsA)
{
HRESULT hr = m_pClsa->QueryInterface(IID_IClsa, (void**)ppObjClsA);
if (SUCCEEDED(hr))
return S_OK
*ppObjClsa = NULL;
return S_FALSE;
}

The same methods for ClsB and ClsC should be in ClsA.

Do you get the idea more or less?

Regards.
AnswerRe: How to Pass c++ object across ATL DLL Pin
Gizzo26-Jan-06 1:49
Gizzo26-Jan-06 1:49 
GeneralRe: How to Pass c++ object across ATL DLL Pin
annjose2426-Jan-06 16:36
annjose2426-Jan-06 16:36 
QuestionHelp with ENTRYID type and ENTRYLIST type Pin
Chris Meech24-Jan-06 10:40
Chris Meech24-Jan-06 10:40 
QuestionRe: Help with ENTRYID type and ENTRYLIST type Pin
Chris Meech26-Jan-06 7:15
Chris Meech26-Jan-06 7:15 
QuestionCOM DLL with IShellPropSheetExt Pin
souso2024-Jan-06 4:00
souso2024-Jan-06 4:00 
Questionsend error message to vb from c++ com Pin
mack scynox24-Jan-06 3:07
mack scynox24-Jan-06 3:07 
AnswerRe: send error message to vb from c++ com Pin
Gizzo24-Jan-06 5:00
Gizzo24-Jan-06 5:00 
GeneralRe: send error message to vb from c++ com Pin
mack scynox24-Jan-06 20:55
mack scynox24-Jan-06 20:55 
Questionprinter shell extension Pin
eisbaer311223-Jan-06 22:53
eisbaer311223-Jan-06 22:53 
AnswerRe: printer shell extension Pin
eisbaer31122-Feb-06 4:27
eisbaer31122-Feb-06 4:27 
QuestionICopyHook Pin
ragavan23-Jan-06 3:00
ragavan23-Jan-06 3:00 
QuestionCOM client must recompile when server compiled? Pin
WernerP23-Jan-06 1:55
WernerP23-Jan-06 1:55 
Questionwhat is a interface? Pin
vikas amin22-Jan-06 19:28
vikas amin22-Jan-06 19:28 
AnswerRe: what is a interface? Pin
Stephen Hewitt22-Jan-06 22:35
Stephen Hewitt22-Jan-06 22:35 
AnswerRe: what is a interface? Pin
Danish jibbran29-Jan-06 1:37
Danish jibbran29-Jan-06 1:37 
Questionabout IMediaSeeking Pin
abstarsss22-Jan-06 17:57
abstarsss22-Jan-06 17:57 
QuestionAttempting to return a BSTR * from a MFC ActiveX to VB .NET Pin
godspeed12322-Jan-06 7:39
godspeed12322-Jan-06 7:39 

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.