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

COM

 
AnswerRe: COM Interdependency Pin
Roger Stoltz12-Jan-06 22:05
Roger Stoltz12-Jan-06 22:05 
AnswerRe: COM Interdependency Pin
Skond20-Jan-06 5:38
Skond20-Jan-06 5:38 
Questionopeneing popwindow as in parent wind using AxWebBrowser Pin
Sufyan_shani6-Jan-06 19:31
Sufyan_shani6-Jan-06 19:31 
QuestionCalling COM DLL in Pocket PC Pin
Logan from Singapore5-Jan-06 0:51
Logan from Singapore5-Jan-06 0:51 
NewsAt Last! My DCOM Tutorial for VS.NET is Here! Pin
Brian C Hart30-Dec-05 22:30
professionalBrian C Hart30-Dec-05 22:30 
QuestionIWebBrowser2::SetUIHandler doesn't call back to get IDocHostUIHandler Pin
Bernie Pallek30-Dec-05 7:04
Bernie Pallek30-Dec-05 7:04 
AnswerRe: IWebBrowser2::SetUIHandler doesn't call back to get IDocHostUIHandler Pin
Bernie Pallek30-Dec-05 10:11
Bernie Pallek30-Dec-05 10:11 
QuestionAccess violation in COM object on exit from DLL using it Pin
Jens Winslow28-Dec-05 13:09
Jens Winslow28-Dec-05 13:09 
Hi, hope someone can help me with this COM access violation on DLL exit...

I have a class (CXmlDom) which wraps MS IXMLDOM COM object to give some XML capability to a DLL. It was based on Tom Archers excellent article "Introducing the XML Document Object Model (DOM)" http://www.codeguru.com/Cpp/misc/misc/article.php/c3707.

The class is used, but not exposed, by dll. The dll has been successfully used in Visual Studio projects in the past.

I tried using the DLL in a new DLL, but now I get access violation on exit.
TestDlg >> NewDll >> OldXmlDll >> CXmlDom
The error occurs (in debug mode) in the destructor of CXmlDom:
_com_ptr_t<_com_IIID<msxml::ixmldomnode,&_guid_2933bf80_7b36_11d2_b20e_00c04f983e60> >::operator=(MSXML::IXMLDOMNode * 0x00000000) line 216 + 3 bytes
_com_ptr_t<_com_IIID<msxml::ixmldomnode,&_guid_2933bf80_7b36_11d2_b20e_00c04f983e60> >::operator=(int 0) line 240
CXmlDom::~CXmlDom() line 702

Based on suggestions on the web, I tried setting the smart pointers IXMLDOMNodePtr and IXMLDOMDocumentPtr to null in ~CXmlDom()
(I had assumed they took care of themselves, being smart).
However, this still gives me access violation on exit, in "pOldInterface->Release();" line 216 of COMIP.h (when it is saving interface)

I am guessing my inexperience with COM and DLLs are leading me to access stuff that has already been destroyed, perhaps due to the use of "nested" dlls.

I tried to use release and detach on smartpointers, but I still get access violations.

Any advice on how to use / unload / release the IXMLDOM COM object in DLLs would be appreciated

(I’m wondering if the COMplicated smart pointers are too smart for me – should never have tried to combine with DLLs Unsure | :~ )

Thanks


Jens Winslow
AnswerRe: Access violation in COM object on exit from DLL using it Pin
Gerald Schwab28-Dec-05 13:58
Gerald Schwab28-Dec-05 13:58 
GeneralRe: Access violation in COM object on exit from DLL using it Pin
Jens Winslow5-Jan-06 9:24
Jens Winslow5-Jan-06 9:24 
AnswerRe: Access violation in COM object on exit from DLL using it Pin
User 2155972-Jan-06 15:29
User 2155972-Jan-06 15:29 
GeneralRe: Access violation in COM object on exit from DLL using it Pin
Jens Winslow5-Jan-06 9:48
Jens Winslow5-Jan-06 9:48 
AnswerRe: Access violation in COM object on exit from DLL using it Pin
sundareswaran.senthilvel13-Jan-06 0:59
professionalsundareswaran.senthilvel13-Jan-06 0:59 
GeneralRe: Access violation in COM object on exit from DLL using it Pin
Jens Winslow13-Jan-06 6:05
Jens Winslow13-Jan-06 6:05 
QuestionProblem when User has selected Chinese Traditional Big5 as international option in outlook2003 Pin
Ganesh_T27-Dec-05 1:51
Ganesh_T27-Dec-05 1:51 
QuestionHow to generate custom HRESULT in COM and display message in to MFC Client? Pin
MandiraT27-Dec-05 0:51
MandiraT27-Dec-05 0:51 
QuestionCOM object with CLSID {845FB959-4279-11D2-BF23-00805FBE84A6} is either not valid or not registered. Pin
Mohamed Jaffar Sagir27-Dec-05 0:21
Mohamed Jaffar Sagir27-Dec-05 0:21 
AnswerRe: COM object with CLSID {845FB959-4279-11D2-BF23-00805FBE84A6} is either not valid or not registered. Pin
PhilWilson4-Jan-06 6:56
PhilWilson4-Jan-06 6:56 
QuestionCannot open include file: 'Wbemidl.h': No such file or directory Pin
abhiramsss26-Dec-05 23:32
abhiramsss26-Dec-05 23:32 
QuestionProblem in Chinese Traditional Charset.. in com addin Pin
Ganesh_T26-Dec-05 18:29
Ganesh_T26-Dec-05 18:29 
QuestionDirectShow: Getting the window handle of a panel Pin
Ramow26-Dec-05 5:20
Ramow26-Dec-05 5:20 
QuestionOut of Proc exe and Win NT service Pin
misha_grewal25-Dec-05 20:06
misha_grewal25-Dec-05 20:06 
QuestionEnterprise services Pin
psantoshkumar25-Dec-05 19:26
psantoshkumar25-Dec-05 19:26 
Questionhelp on ATL COM first-chance exeption problem Pin
hardworkboy22-Dec-05 15:23
hardworkboy22-Dec-05 15:23 
AnswerRe: help on ATL COM first-chance exeption problem Pin
Stephen Hewitt10-Jan-06 14:13
Stephen Hewitt10-Jan-06 14:13 

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.