Click here to Skip to main content
15,897,891 members
Home / Discussions / COM
   

COM

 
QuestionQuestion about CoRegisterClassObject Pin
Paulino De Assis Fong16-Jun-06 11:35
Paulino De Assis Fong16-Jun-06 11:35 
QuestionExcel and .Net2.0 Pin
Vizmunt15-Jun-06 11:49
Vizmunt15-Jun-06 11:49 
Questionhow to use IMultiMediastream ::GetDuration() Pin
GANsJob15-Jun-06 1:19
GANsJob15-Jun-06 1:19 
AnswerRe: how to use IMultiMediastream ::GetDuration() Pin
Aamir Butt18-Jun-06 23:51
Aamir Butt18-Jun-06 23:51 
GeneralRe: how to use IMultiMediastream ::GetDuration() Pin
GANsJob19-Jun-06 21:56
GANsJob19-Jun-06 21:56 
QuestionCom DCOM on Win 2003 Pin
Goodway13-Jun-06 5:57
Goodway13-Jun-06 5:57 
AnswerRe: Com DCOM on Win 2003 Pin
Aamir Butt14-Jun-06 1:27
Aamir Butt14-Jun-06 1:27 
QuestionBrowser Helper Object, problem with SHDocVw.DWebBrowserEvents2_Event.DocumentComplete [modified] Pin
klepa11235813-Jun-06 5:04
klepa11235813-Jun-06 5:04 
I'm writing Browser Helper Object (IExplorer plug-in) in C#, Microsoft VS 2005, Framwork 2.0.
1. I implement interface IObjectWithSite and add event handler for events SHDocVw.DWebBrowserEvents2_Event.DocumentComplete and SHDocVw.DWebBrowserEvents2_Event.OnQuit in function SetSite :
[System.Runtime.InteropServices.ComImport, System.Runtime.InteropServices.Guid( "FC4801A3-2BA9-11CF-A229-00AA003D7352" ), System.Runtime.InteropServices.InterfaceType( System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown )]
public interface IObjectWithSite
{
void SetSite( [System.Runtime.InteropServices.In, System.Runtime.InteropServices.MarshalAs( System.Runtime.InteropServices.UnmanagedType.IUnknown )] object pUnkSite );
void GetSite( [System.Runtime.InteropServices.In] ref System.Guid riid, [System.Runtime.InteropServices.Out] System.IntPtr ppvSite );
}
[System.Runtime.InteropServices.ComVisible( true ), System.Runtime.InteropServices.Guid( "C06B3B91-769A-42d5-8BCD-CF70F8589FBA" ), System.Runtime.InteropServices.ClassInterface( System.Runtime.InteropServices.ClassInterfaceType.None )]
public class DOMPeek : IObjectWithSite
{
void IObjectWithSite.SetSite( object pUnkSite )
{
if(m_IUnkSite != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject( m_IUnkSite );
}
m_IUnkSite = pUnkSite;
try
{
SHDocVw.DWebBrowserEvents2_Event WebBrowserEvents = (SHDocVw.DWebBrowserEvents2_Event)m_IUnkSite;
WebBrowserEvents.DocumentComplete += new SHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler( OnDocumentComplete );
WebBrowserEvents.OnQuit += new SHDocVw.DWebBrowserEvents2_OnQuitEventHandler( OnQuit );
}
catch // cast or no such interface exception
{
}
return;
}
void IObjectWithSite.GetSite( ref System.Guid riid, System.IntPtr ppvSite )
{
}
2. Implement event handlers OnQuit and DocumentComplete
void OnQuit()
{
System.Windows.Forms.MessageBox.Show( "OnQuit" );
}
void OnDocumentComplete( object pDispatch, ref object VariantURL )
{
System.Windows.Forms.MessageBox.Show( "OnDocumentComplete : " + VariantURL );
}
3. I register the object DOMPeek as Browser Helper Object in windows register.

Then I run IExplorer and see the messageBox "OnDocumentComplete : about:blank". Then I close IE window and see the messageBox "OnQuite".

The problem consist in that I take this result only in MSWindosw2003sp1 (server) with MS VS2005 installed. In MSWindowsXPsp2 without any updates, without MS VS2005, but with all Framework installed I didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". What's problem??? What updates need for correct working in MSWindowsXPsp2???
Then I try to install all updates for MSWindowsXPsp2 from Microsoft site and again didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". Then I try to install MS VS2005 but didn't install all updates for MSWindowsXPsp2 and again didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". Finally I install all updates for MSWindowsXPsp2 from microsoft site and then MS VS2005 then I see the messageBox "OnDocumentComplete : about:blank" and "OnQuit". But if I install MS VS2005 and then all updates for MSWindowsXPsp2 then not woking (didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit").

What's problem??? What specifically updates need for correct working in MSWindowsXPsp2???
QuestionHow to get a HBITMAP? Pin
athomass13-Jun-06 4:52
athomass13-Jun-06 4:52 
AnswerRe: How to get a HBITMAP? Pin
Laxman Auti13-Jun-06 21:58
Laxman Auti13-Jun-06 21:58 
GeneralRe: How to get a HBITMAP? Pin
athomass14-Jun-06 2:09
athomass14-Jun-06 2:09 
AnswerRe: How to get a HBITMAP? Pin
Laxman Auti14-Jun-06 3:41
Laxman Auti14-Jun-06 3:41 
QuestionWMI Pin
abhiramsss12-Jun-06 21:07
abhiramsss12-Jun-06 21:07 
QuestionHow to embed external document? Pin
Super Lloyd12-Jun-06 19:55
Super Lloyd12-Jun-06 19:55 
AnswerRe: How to embed external document? Pin
Aamir Butt14-Jun-06 1:16
Aamir Butt14-Jun-06 1:16 
GeneralRe: How to embed external document? Pin
Super Lloyd14-Jun-06 1:53
Super Lloyd14-Jun-06 1:53 
QuestionServer busy message box Pin
Rinu_Raj11-Jun-06 23:43
Rinu_Raj11-Jun-06 23:43 
Generalusing com object of photoshop Pin
santhoshkumar_pv9-Jun-06 20:25
santhoshkumar_pv9-Jun-06 20:25 
QuestionCOM-.NET interoperability (string - BSTR marshalling) Pin
Prasadrn9-Jun-06 1:23
Prasadrn9-Jun-06 1:23 
AnswerRe: COM-.NET interoperability (string - BSTR marshalling) Pin
Andy Moore10-Jun-06 11:45
Andy Moore10-Jun-06 11:45 
Questionuse an automation object from a service Pin
joepadmiraal8-Jun-06 23:32
joepadmiraal8-Jun-06 23:32 
QuestionProblem in using Mlang Pin
Abhinav agrawal7-Jun-06 5:42
Abhinav agrawal7-Jun-06 5:42 
AnswerRe: Problem in using Mlang Pin
Stephen Hewitt8-Jun-06 17:52
Stephen Hewitt8-Jun-06 17:52 
QuestionCOM Servers Pin
HakunaMatada7-Jun-06 2:29
HakunaMatada7-Jun-06 2:29 
AnswerRe: COM Servers Pin
Roger Stoltz7-Jun-06 11:04
Roger Stoltz7-Jun-06 11:04 

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.