Click here to Skip to main content
16,010,022 members
Home / Discussions / COM
   

COM

 
AnswerRe: IE has blocked this site from using an ActiveX in an unsafe manner. As a result, this page may not display correctly Pin
Calc2019-Sep-05 21:56
Calc2019-Sep-05 21:56 
GeneralRe: IE has blocked this site from using an ActiveX in an unsafe manner. As a result, this page may not display correctly Pin
Spaz8020-Sep-05 23:30
Spaz8020-Sep-05 23:30 
QuestionWhere to download com standard doc? Pin
followait18-Sep-05 22:30
followait18-Sep-05 22:30 
Question_SAccess COM+ objects remotely Pin
Member 186603018-Sep-05 16:55
Member 186603018-Sep-05 16:55 
QuestionComObjects does not work in Windows98 Pin
Nilesh Gambhava17-Sep-05 23:33
Nilesh Gambhava17-Sep-05 23:33 
QuestionActivex controls. Property category Pin
Reza.J17-Sep-05 8:43
sussReza.J17-Sep-05 8:43 
QuestionDB2 for OS/390 access in a class utilizing COM+ services. Pin
tsramkumar16-Sep-05 12:13
tsramkumar16-Sep-05 12:13 
Questionproblem using CoMarshalInterThreadInterfaceInStream/CoGetInterfaceAndReleaseStream Pin
mbapat16-Sep-05 5:31
mbapat16-Sep-05 5:31 
I am having problems using CoMarshalInterThreadInterfaceInStream/CoGetInterfaceAndReleaseStream. I have a smart pointer IXMLDOMDocumentPtr which I want to share between a few different threads. I want to marshal it across my threads. I am using the aforementioned functions to do the same. What I see is that both the functions above return an S_OK and I finally get a IXMLDOMDocumentPtr in the other thread. I can use XPath to select nodes etc but when I try to get the owner document an exception is thrown "Invalid access to memory location".

In thread A I do the following:
typedef MSXML2::IXMLDOMDocumentPtr XML2DocumentPtr;

XML2DocumentPtr pDocXML;
pDocXML.CreateInstance(CLSID_DOMDocument);
pDocXML->load( "c://config.xml");

IStream* pIStream = NULL;
IID iid = __uuidof(IXMLDOMDocument);

HRESULT hr = CoMarshalInterThreadInterfaceInStream( iid, pDocXML.GetInterfacePtr(), &pIStream);

In thread B I do the following:

IID iid = __uuidof(IXMLDOMDocument);
XML2DocumentPtr pDocXML = NULL;
HRESULT hr = CoGetInterfaceAndReleaseStream(m_pIStream, iid, (LPVOID*)&pDocXML);

m_pIStream has already been saved after the CoMarshalInterThreadInterfaceInStream.
When I use the pDocXML to query the xml document for elements, nodes I can do that. But when I use the elements and nodes to ask for the owner document in order to create a new element or a node, I get the above mentioned exception "Invalid access to memory location". Any ideas as to what I might be doing wrong?
AnswerRe: problem using CoMarshalInterThreadInterfaceInStream/CoGetInterfaceAndReleaseStream Pin
Roger Stoltz19-Sep-05 21:38
Roger Stoltz19-Sep-05 21:38 
QuestionActiveX comunication Pin
Calc2016-Sep-05 0:46
Calc2016-Sep-05 0:46 
QuestionDual Interface Pin
BicycleTheif15-Sep-05 18:54
BicycleTheif15-Sep-05 18:54 
QuestionCoClass created within thread Pin
BillMcMahon15-Sep-05 10:37
BillMcMahon15-Sep-05 10:37 
Questionactivex problems... Pin
l a u r e n15-Sep-05 9:28
l a u r e n15-Sep-05 9:28 
GeneralRe: activex problems... Pin
Jörgen Sigvardsson15-Sep-05 9:57
Jörgen Sigvardsson15-Sep-05 9:57 
GeneralRe: activex problems... Pin
l a u r e n15-Sep-05 10:00
l a u r e n15-Sep-05 10:00 
GeneralRe: activex problems... Pin
rwestgraham15-Sep-05 10:11
rwestgraham15-Sep-05 10:11 
GeneralRe: activex problems... Pin
l a u r e n15-Sep-05 10:15
l a u r e n15-Sep-05 10:15 
GeneralRe: activex problems... Pin
Jörgen Sigvardsson16-Sep-05 7:10
Jörgen Sigvardsson16-Sep-05 7:10 
GeneralRe: activex problems... Pin
l a u r e n16-Sep-05 8:04
l a u r e n16-Sep-05 8:04 
GeneralRe: activex problems... Pin
rwestgraham16-Sep-05 14:24
rwestgraham16-Sep-05 14:24 
GeneralRe: activex problems... Pin
l a u r e n19-Sep-05 6:20
l a u r e n19-Sep-05 6:20 
GeneralRe: activex problems... Pin
Jörgen Sigvardsson16-Sep-05 14:38
Jörgen Sigvardsson16-Sep-05 14:38 
GeneralRe: activex problems... Pin
rwestgraham16-Sep-05 15:19
rwestgraham16-Sep-05 15:19 
GeneralRe: activex problems... Pin
Jörgen Sigvardsson17-Sep-05 9:31
Jörgen Sigvardsson17-Sep-05 9:31 
GeneralRe: activex problems... Pin
rwestgraham17-Sep-05 12:05
rwestgraham17-Sep-05 12:05 

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.