MarkD wrote:
I'm using the latest Netscape 7.1 and am trying to get my ActiveX
control to work in it.  I can get it to load.  However, I have a
parameter the represents a URL for my activeX to load.  In IE, I use a
URL_Loader control that basically, gets the clientsite, then typecast
it to a IBINDHOST.  From there I create a URLMoniker from the
BindingHost and I bind that to a Stream.  This way I can read the
contents of the URL.  The code is below.

   if (MYACTIVEXCONTROL as IOleObject).GetClientSite(ClientSite) <>
S_OK then    Abort;
   BindingHost := ClientSite as UrlMon.IBindHost;
   if (CreateAsyncBindCtx(0, Self as IBindStatusCallBack, nil,
BindContext) <> S_OK) or
      (BindingHost.CreateMoniker(URLW, BindContext, Moniker, 0) <>
S_OK) or
      Failed(BindingHost.MonikerBindToStorage(Moniker, BindContext,
Self,
                                              IID_IStream, Stream))

WHen I'm running in NS7, the ClientSite doen't support IBindHost.  Is
there some other way of reading the contents of a URL from within an
ActiveX control.

Thanks,
Mark DeMichele

Which plugin are you using to load the control?


If it's the one that ships by default by NS7.1 or the one on my site designed for Moz1.4 or NS 7.1, then yes it does support IBindHost. But to get it you must QueryInterface for IServiceProvider and call IServiceProvider::GetService to obtain it.

So hopefully the code should work with only a minor alteration.

Adam




Reply via email to