Click here to Skip to main content
15,914,444 members
Home / Discussions / COM
   

COM

 
AnswerRe: the Invoke() method ? Pin
necroleak12-Sep-04 4:09
sussnecroleak12-Sep-04 4:09 
AnswerRe: the Invoke() method ? Pin
Jörgen Sigvardsson12-Sep-04 9:08
Jörgen Sigvardsson12-Sep-04 9:08 
GeneralCreating A sample COM with VB6.0 Pin
Shanazhi11-Sep-04 2:38
Shanazhi11-Sep-04 2:38 
GeneralAdding ActiveX control in ActiveX control Project Pin
Muhammad Azam9-Sep-04 4:14
Muhammad Azam9-Sep-04 4:14 
GeneralRe: Adding ActiveX control in ActiveX control Project Pin
herbert_chow10-Sep-04 7:46
herbert_chow10-Sep-04 7:46 
GeneralRe: Adding ActiveX control in ActiveX control Project Pin
Muhammad Azam12-Sep-04 18:51
Muhammad Azam12-Sep-04 18:51 
GeneralThread Safety Problem Pin
.Suchit9-Sep-04 3:17
.Suchit9-Sep-04 3:17 
GeneralRe: Thread Safety Problem Pin
Jörgen Sigvardsson12-Sep-04 9:21
Jörgen Sigvardsson12-Sep-04 9:21 
Someone wrote:
Another CComObject component in thread T2 of the same process - tries to access methods of this ActiveX control.

Please have a look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/cmf_a2c_88tp.asp[^]

Suppose you have the interface pointer pCtrl in thread T1. Then you cannot use that pointer straight away in thread T2. You would have to do something like this:
IStream* pStream;
CoMarshalInterThreadInterfaceInStream(IID_ITheInterfaceID, pCtrl, &pStream);
If the call is successful, pStream will be a stream containing a reference to your object pCtrl and apartment marshalling information.

In thread T2, you pick up the pStream object, and unmarshal the interface pointer from the stream like this:
ITheInterface* pCtrl2;
// I can't remember if the stream needs to be rewound or not
// if this code fails, please see IStream::Seek()
CoGetInterfaceAndReleaseStream(pStream, IID_ITheInterfaceID, (void**)pCtrl2);
The interface pointer pCtrl2 will now be accessible in thread T2. Generally speaking, the interface pointer deserialized from a stream is accessible in the thread where it was deserialized.

--
Arigato gozaimashita!
GeneralRe: Thread Safety Problem Pin
.Suchit14-Sep-04 4:06
.Suchit14-Sep-04 4:06 
QuestionHow to create a autofill toolbar like of google Pin
akszn8-Sep-04 23:09
akszn8-Sep-04 23:09 
GeneralCapture event Pin
andy_cn8-Sep-04 22:15
andy_cn8-Sep-04 22:15 
Generalobject of MFC class in ATL Dll Pin
zahid_ash8-Sep-04 20:59
zahid_ash8-Sep-04 20:59 
Generala problem with connecting evevts to sink Pin
andy_cn8-Sep-04 17:05
andy_cn8-Sep-04 17:05 
GeneralIAddresBook problem Pin
Irek Zielinski7-Sep-04 7:50
Irek Zielinski7-Sep-04 7:50 
GeneralReterive OCX properties from handle Pin
mohandasgandhiG6-Sep-04 23:24
mohandasgandhiG6-Sep-04 23:24 
GeneralWrapping an existing COM object Pin
lemur26-Sep-04 4:43
lemur26-Sep-04 4:43 
GeneralRe: Wrapping an existing COM object Pin
Jörgen Sigvardsson6-Sep-04 8:56
Jörgen Sigvardsson6-Sep-04 8:56 
GeneralRe: Wrapping an existing COM object Pin
lemur26-Sep-04 20:28
lemur26-Sep-04 20:28 
GeneralRe: Wrapping an existing COM object Pin
lemur26-Sep-04 21:15
lemur26-Sep-04 21:15 
GeneralATL dialog with ActiveX control inside Windows service Pin
6-Sep-04 2:42
suss6-Sep-04 2:42 
GeneralDiffernce between ATL DLL, ATL Service and ATL EXE Pin
zahid_ash5-Sep-04 20:20
zahid_ash5-Sep-04 20:20 
GeneralRe: Differnce between ATL DLL, ATL Service and ATL EXE Pin
Jörgen Sigvardsson6-Sep-04 9:02
Jörgen Sigvardsson6-Sep-04 9:02 
Generalregistering windows service Pin
prasadbs5-Sep-04 17:42
prasadbs5-Sep-04 17:42 
GeneralDo I need to destory a SAFEARRAY that is passed in as an argument Pin
timtanbin3-Sep-04 19:57
timtanbin3-Sep-04 19:57 
GeneralRe: Do I need to destory a SAFEARRAY that is passed in as an argument Pin
Anonymous4-Sep-04 8:23
Anonymous4-Sep-04 8: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.