Click here to Skip to main content
15,898,947 members
Home / Discussions / COM
   

COM

 
AnswerRe: Why we need COM Pin
Nathan Holt at EMOM18-Sep-07 7:43
Nathan Holt at EMOM18-Sep-07 7:43 
GeneralRe: Why we need COM Pin
Nandu_77b19-Sep-07 5:31
Nandu_77b19-Sep-07 5:31 
GeneralRe: Why we need COM Pin
Baltoro4-Oct-07 12:44
Baltoro4-Oct-07 12:44 
QuestionAvoid hang of the component manager with com+ console messages [modified] Pin
Vider18-Sep-07 1:51
Vider18-Sep-07 1:51 
Questioncom and threading models,and a question about dlls? Pin
rozbeh18-Sep-07 0:18
rozbeh18-Sep-07 0:18 
AnswerRe: com and threading models,and a question about dlls? Pin
Nathan Holt at EMOM18-Sep-07 7:52
Nathan Holt at EMOM18-Sep-07 7:52 
QuestionCOM List over Network Pin
Fatbuddha 117-Sep-07 21:22
Fatbuddha 117-Sep-07 21:22 
Questionusing void ** in Interface Pin
tictactoer17-Sep-07 3:26
tictactoer17-Sep-07 3:26 
Hi,
Right now I am developing a COM wrapper for some native C++ classes. Those native C++ class vastly use STL containers for their inputs and outputs. I provided COM interfaces for each of those containers in COM wrapper side. But when I want to pass in the collection of values from COM wrapper side to native C++ side, I am extracting the internal object (ex. a vector/list/map/set) in the COM wrapper side which holds the values.

For extracting the internal object (a STL container), I type casted the whole STL container to void ** and returning the value. Again, In my client side, i am retype casting to get the required STL container.

But for me, this typecasting is not working all the time. what is the best way to extract the internal object?

An example scenario:

in Native C++, the following code is working fine.

vector<int>* pV = new vector<int>
pV->push_back(10);
pV->push_back(20);
pV->push_back(30);

void *pVoid = (void*) pV;

vector<int>* oV = (vector<int>*)pVoid;

the above code is working fine, if it is native C++ side.

when it comes to COM,
ISomeCollection *pColl;
void *pV = NULL;
pColl->InternalObject(&pV);//signature is InternalObject (void**)

vector<int>* pVec = (vector<int>*) pV;

the above code is not working all the times.

Any suggestions for this code is highly appreciated.

thanks
Ng
AnswerRe: using void ** in Interface Pin
Nathan Holt at EMOM17-Sep-07 9:59
Nathan Holt at EMOM17-Sep-07 9:59 
GeneralRe: using void ** in Interface Pin
tictactoer19-Sep-07 0:00
tictactoer19-Sep-07 0:00 
GeneralRe: using void ** in Interface Pin
Nathan Holt at EMOM19-Sep-07 11:22
Nathan Holt at EMOM19-Sep-07 11:22 
QuestionProblem in adding a new function in existing Interface Pin
Ravikr0716-Sep-07 22:57
Ravikr0716-Sep-07 22:57 
AnswerRe: Problem in adding a new function in existing Interface Pin
Nathan Holt at EMOM17-Sep-07 10:07
Nathan Holt at EMOM17-Sep-07 10:07 
GeneralRe: Problem in adding a new function in existing Interface Pin
Ravikr0717-Sep-07 10:25
Ravikr0717-Sep-07 10:25 
GeneralRe: Problem in adding a new function in existing Interface Pin
Nathan Holt at EMOM17-Sep-07 11:08
Nathan Holt at EMOM17-Sep-07 11:08 
GeneralRe: Problem in adding a new function in existing Interface Pin
Ravikr0717-Sep-07 19:37
Ravikr0717-Sep-07 19:37 
GeneralRe: Problem in adding a new function in existing Interface Pin
Nathan Holt at EMOM18-Sep-07 7:24
Nathan Holt at EMOM18-Sep-07 7:24 
GeneralRe: Problem in adding a new function in existing Interface Pin
paresh_joe26-Sep-07 2:50
paresh_joe26-Sep-07 2:50 
QuestionGetting a ('support_error_info' : attribute not found) error Pin
monsieur_jj16-Sep-07 21:15
monsieur_jj16-Sep-07 21:15 
AnswerRe: Getting a ('support_error_info' : attribute not found) error Pin
Nathan Holt at EMOM17-Sep-07 10:13
Nathan Holt at EMOM17-Sep-07 10:13 
QuestionAxtiveX, this pointer [modified] Pin
m1m216-Sep-07 10:38
m1m216-Sep-07 10:38 
QuestionCan i use a dll in an activeX component? Pin
just3ala215-Sep-07 10:04
just3ala215-Sep-07 10:04 
AnswerRe: Can i use a dll in an activeX component? Pin
Nathan Holt at EMOM17-Sep-07 10:17
Nathan Holt at EMOM17-Sep-07 10:17 
GeneralRe: Can i use a dll in an activeX component? Pin
just3ala217-Sep-07 12:26
just3ala217-Sep-07 12:26 
QuestionDifference between .idl and .h file? Pin
Ash2014-Sep-07 0:23
Ash2014-Sep-07 0:23 

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.