J
Jeff Gaines
I posted this in the interop group but it's fairly quiet there so hope
that somebody here may be able to help.
I am writing an app for Vista 64 using C Sharp which hosts an
IExplorerBrowser in a control. It is based on an article on The Code
Project (<http://www.codeproject.com/KB/vista/ExplorerBrowser.aspx>) which
is written in unmanaged C++.
I have managed to get an instance of the IExplorerBrowser using
Activator.CreateInstance and I can display it in my control.
I want to trap some events using the IExplorerBrowserEvents Interface but
I am stumped as to how to create an instance of this interface,
Activator.CreateInstance won't play, nor will CoCreateInstance or
SHCoCreateInstance. I have also created a class which implements the
interface but passing a reference to an instance of that class to
IExplorerBrowser.Advise fails.
ATL has a very useful class called CComObject and also CComPtr but they
not available to me in C# / managed code, unless anybody has written an
equivalent?
I did a search of the registry for IExplorerBrowserEvents and it's not in
there, although IExplorerBrowser is. It seems to me that may be important
but my brain is too far gone now to think that through. The C++ example I
down-loaded compiles and runs OK though, so somehow the OS can find this
interface.
So can anybody tell what I need to do to create a valid
IExplorerBrowserEvents so that I can trap/pick up the events fired by the
IExplorerBrowser?
Any advice would be much appreciated
that somebody here may be able to help.
I am writing an app for Vista 64 using C Sharp which hosts an
IExplorerBrowser in a control. It is based on an article on The Code
Project (<http://www.codeproject.com/KB/vista/ExplorerBrowser.aspx>) which
is written in unmanaged C++.
I have managed to get an instance of the IExplorerBrowser using
Activator.CreateInstance and I can display it in my control.
I want to trap some events using the IExplorerBrowserEvents Interface but
I am stumped as to how to create an instance of this interface,
Activator.CreateInstance won't play, nor will CoCreateInstance or
SHCoCreateInstance. I have also created a class which implements the
interface but passing a reference to an instance of that class to
IExplorerBrowser.Advise fails.
ATL has a very useful class called CComObject and also CComPtr but they
not available to me in C# / managed code, unless anybody has written an
equivalent?
I did a search of the registry for IExplorerBrowserEvents and it's not in
there, although IExplorerBrowser is. It seems to me that may be important
but my brain is too far gone now to think that through. The C++ example I
down-loaded compiles and runs OK though, so somehow the OS can find this
interface.
So can anybody tell what I need to do to create a valid
IExplorerBrowserEvents so that I can trap/pick up the events fired by the
IExplorerBrowser?
Any advice would be much appreciated