Many repliers suggest me following idea but i didn't get .SetSite
funtion when i register gear dll in my project

Hi Ramesh, I think you can accomplish what you want by explicitly
creating
an instance of the Gears.BHO (COM Object) and calling it's
SetSite(browsercontrol) method after you have created an instance of
the IE
browser control. And then prior to disposing of the embedded IE
control,
calling gearsBho.SetSite(NULL).
Scriptable gears objects should be accessible to scripts executing
within
the embedded instance w/o manually initializing the Gears.BHO.  The
manual
BHO initialization will cause gears to register it's network intercept
hooks
(a asynchronous pluggable protocol handler). Generally the network
intercept
hooks are only registered within an actual IE process. Once that is
done in
your process, http resources contained in the gears localserver should
be
returned when requested by the embedded browser control (and by other
parts
of your app that use URLMON too).


Hope this helps.




On Sep 26, 2:39 pm, NealLee <[EMAIL PROTECTED]> wrote:
> Thanks, Michael!!
> It can work now : )
>
> On Sep 26, 2:29 am, Michael Nordman <[EMAIL PROTECTED]> wrote:
>
>
>
> > This question has been asked before in the context of a VB 
> > app.http://groups.google.com/group/gears-eng/browse_thread/thread/f22ce1f...
>
> > Dimitri is right, the Gears.BHO is not being loaded. Many applications embed
> > IE and we don't want to load Gears into them indiscriminently. As an app
> > developer, you should be able to explicitly load and initialize the
> > Gears.BHO in your .net application. When creating your embedded browser
> > control, you will want to...
>
> > * create an instance of the Gears.BHO COM object
> > * get a reference to it's IObjectWithSite interface pointer
> > * call the SetSite(iunknownOfEmbeddedBrowserControl)
>
> > Hope this helps.
>
> > Michael
>
> > On Thu, Sep 25, 2008 at 8:52 AM, Dimitri Glazkov
> > <[EMAIL PROTECTED]>wrote:
>
> > > WebBrowser Control doesn't load any BHO's (Browser Helper Objects),
> > > which means that Gears won't be loaded when you instantiate the
> > > control. You could probably finagle your way into doing that manually,
> > > but that would probably not be a supported way to run Gears...
>
> > > Scratch that. I can't find any references on how to do accomplish that
> > > manually using managed code. So, the short answer is no, you can't do
> > > that.
>
> > > :DG<
>
> > > On Thu, Sep 25, 2008 at 8:25 AM, Ben Lisbakken <[EMAIL PROTECTED]>
> > > wrote:
> > > > I'm going to CC Dimitri Glazkov because he's posted a .NET tutorial
> > > before
> > > > and he might have an idea on this question.
> > > > I don't have experience with .NET, though, so I can't help.
> > > > -Ben
>
> > > > On Thu, Sep 25, 2008 at 4:23 AM, NealLee <[EMAIL PROTECTED]> wrote:
>
> > > >> Hi all,
>
> > > >> I'm working on a project which use .net WebBrowser Control to embedded
> > > >> a IE into a desktop-app.
>
> > > >> Everything is working fine, but when I take offline, .net WebBrowser
> > > >> Control seems can't access the LocalServer cached files, it always
> > > >> send a request to server, so web page can't be displayed.
>
> > > >> Have anyone encountered this problem too?
>
> > > >> Thanks a lot!!- Hide quoted text -
>
> - Show quoted text -

Reply via email to