Click here to Skip to main content
16,004,919 members
Home / Discussions / COM
   

COM

 
GeneralRe: How do I FULLY unregister a COM+ component programmatically from managed code? Pin
Boyd Campbell7-Jul-04 11:12
Boyd Campbell7-Jul-04 11:12 
GeneralRe: How do I FULLY unregister a COM+ component programmatically from managed code? Pin
darkbyte8-Jul-04 2:37
darkbyte8-Jul-04 2:37 
GeneralRe: How do I FULLY unregister a COM+ component programmatically from managed code? Pin
Boyd Campbell8-Jul-04 2:54
Boyd Campbell8-Jul-04 2:54 
GeneralType library that has no coclass Pin
pain23-Jun-04 16:08
pain23-Jun-04 16:08 
GeneralFile Monitor Component Pin
robdillon122-Jun-04 23:19
robdillon122-Jun-04 23:19 
GeneralRe: File Monitor Component Pin
pain23-Jun-04 16:05
pain23-Jun-04 16:05 
GeneralRe: File Monitor Component Pin
robdillon123-Jun-04 20:55
robdillon123-Jun-04 20:55 
GeneralGetting an IXMLDOMDocument on DocumentComplete from an IE Control Pin
zumichu21-Jun-04 12:27
zumichu21-Jun-04 12:27 
I have a dialog that hosts an IE ActiveX component. My OnDocumentComplete looks like this:

bool CMyClass::ParseDoc(CComPtr[IHTMLDocument2] pDoc){...};
bool CMyClass::ParseDoc(CComPtr[IXMLDOMDocument] pDoc){...};

void __stdcall CMyClass::OnDocumentComplete(IDispatch* pDisp, VARIANT* URL)
{
	if (m_pBrowser == (IWebBrowser2*)pDisp)					//Get top-level document complete
	{
		CComPtr<IDispatch> pDispatch;
		m_pBrowser->get_Document(&pDispatch);

		CComQIPtr[IHTMLDocument2] pHTMLDoc;
		CComQIPtr[IXMLDOMDocument] pXMLDoc;

                if ((pHTMLDoc = pDispatch) && ParseDoc(pHTMLDoc))		//Parse HTML doc
		{
			...
		}
		
		if ((pXMLDoc = pDispatch) && ParseDoc(pXMLDoc))		//Parse XML doc
		{
			...
		}

		pDispatch.Release();
	}
}


The problem is, even when the document is an XML document, the QueryInterface for IHTMLDocument works, but the QI for IXMLDOMDocument fails. This seems like the way to do it, but I guess not. How can I proccess the document without knowing wether it's going to be HTML or XML?

Thank you.
GeneralRe: Getting an IXMLDOMDocument on DocumentComplete from an IE Control Pin
Andrew Quinn AUS21-Jun-04 22:20
Andrew Quinn AUS21-Jun-04 22:20 
GeneralRe: Getting an IXMLDOMDocument on DocumentComplete from an IE Control Pin
zumichu25-Jun-04 8:30
zumichu25-Jun-04 8:30 
QuestionHow to increment the version number of an ActiveX control? Pin
ssudhaiyer20-Jun-04 23:34
ssudhaiyer20-Jun-04 23:34 
GeneralHelp Connection Points Pin
bariraniahmad18-Jun-04 8:42
bariraniahmad18-Jun-04 8:42 
GeneralRe: Help Connection Points Pin
Andrew Quinn AUS20-Jun-04 22:49
Andrew Quinn AUS20-Jun-04 22:49 
QuestionCreateInstance(&quot;MyDll.Class&quot;) returns &quot;Invalid class string&quot;? Pin
anderslundsgard18-Jun-04 0:10
anderslundsgard18-Jun-04 0:10 
AnswerRe: CreateInstance(&quot;MyDll.Class&quot;) returns &quot;Invalid class string&quot;? Pin
Jörgen Sigvardsson18-Jun-04 11:30
Jörgen Sigvardsson18-Jun-04 11:30 
GeneralRe: CreateInstance(&quot;MyDll.Class&quot;) returns &quot;Invalid class string&quot;? Pin
anderslundsgard19-Jun-04 22:19
anderslundsgard19-Jun-04 22:19 
GeneralRe: CreateInstance(&quot;MyDll.Class&quot;) returns &quot;Invalid class string&quot;? Pin
Jörgen Sigvardsson19-Jun-04 22:24
Jörgen Sigvardsson19-Jun-04 22:24 
QuestionHow this possible??? Pin
El'Cachubrey17-Jun-04 23:08
El'Cachubrey17-Jun-04 23:08 
QuestionHow can I use OLEDB to read a table with more than 1 BLOB fields? Pin
Benjamin Young17-Jun-04 23:05
Benjamin Young17-Jun-04 23:05 
GeneralCollection Pin
Tuwing.Sabado16-Jun-04 23:08
Tuwing.Sabado16-Jun-04 23:08 
GeneralRe: Collection Pin
Ghazi H. Wadi20-Jun-04 2:12
Ghazi H. Wadi20-Jun-04 2:12 
QuestionHow to implement custom print? Pin
Member 52815516-Jun-04 19:07
Member 52815516-Jun-04 19:07 
Generalcustom metadata editor for ArcCatalog Pin
abhishk2001@yahoo.com16-Jun-04 11:55
abhishk2001@yahoo.com16-Jun-04 11:55 
QuestionWhat happens when I load my dll this way&#8230; ? Pin
anderslundsgard16-Jun-04 1:44
anderslundsgard16-Jun-04 1:44 
AnswerRe: What happens when I load my dll this way&#8230; ? Pin
RChin16-Jun-04 6:37
RChin16-Jun-04 6:37 

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.