|
|
|
date: Wed, 6 Aug 2008 23:38:12 -0700 (PDT),
group: microsoft.public.inetsdk.programming.webbrowser_ctl
back
Re: Determine which app handles a URL
"Dave Brown" wrote in message
news:2688928f-6029-471a-b125-e309fabb4a6b@v13g2000pro.googlegroups.com
> Hi - how can I prevent an IWebBrowser2 control from trying to launch a
> helper app when loading a url?
>
> For example, a URL like this:
>
> http://api.flickr.com/services/feeds/geo/?id=19773663@N00&lang=en-us&format=kml_nl
>
> tries to launch Google Earth if it's installed, otherwise it brings up
> a dialog box asking what to do with the file. Can I prevent both of
> these events from happening, and just disregard the page load? Or at
> least detect when it's a non-HTML page and cancel the load ??
Try enabling FEATURE_RESTRICT_FILEDOWNLOAD (see
CoInternetSetFeatureEnabled). If that doesn't help, try implementing
IInternetSecurityManager, handling
ProcessUrlAction(URLACTION_SHELL_FILE_DOWNLOAD) and responding with
URLPOLICY_DISALLOW.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
date: Thu, 7 Aug 2008 08:06:18 -0400
author: Igor Tandetnik
Re: Determine which app handles a URL
On Aug 7, 5:06 am, "Igor Tandetnik" wrote:
> "Dave Brown" wrote in message
>
> news:2688928f-6029-471a-b125-e309fabb4a6b@v13g2000pro.googlegroups.com
>
> > Hi - how can I prevent an IWebBrowser2 control from trying to launch a
> > helper app when loading a url?
>
> > For example, a URL like this:
>
> >http://api.flickr.com/services/feeds/geo/?id=19773663@N00&lang=en...
>
> > tries to launch Google Earth if it's installed, otherwise it brings up
> > a dialog box asking what to do with the file. Can I prevent both of
> > these events from happening, and just disregard the page load? Or at
> > least detect when it's a non-HTML page and cancel the load ??
>
> Try enabling FEATURE_RESTRICT_FILEDOWNLOAD (see
> CoInternetSetFeatureEnabled). If that doesn't help, try implementing
> IInternetSecurityManager, handling
> ProcessUrlAction(URLACTION_SHELL_FILE_DOWNLOAD) and responding with
> URLPOLICY_DISALLOW.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
Hi Igor - neither of those helped. I handle both: URLACTION_SHELL_VERB
and URLACTION_SHELL_FILE_DOWNLOAD and respond wth dis-allow, but that
code doesn't get hit on that geo link above. I still get prompted with
a file download box :(
Any other ideas?
date: Thu, 7 Aug 2008 12:01:43 -0700 (PDT)
author: Dave Brown
Re: Determine which app handles a URL
On Aug 7, 12:01 pm, Dave Brown wrote:
> On Aug 7, 5:06 am, "Igor Tandetnik" wrote:
>
>
>
>
>
> > "Dave Brown" wrote in message
>
> >news:2688928f-6029-471a-b125-e309fabb4a6b@v13g2000pro.googlegroups.com
>
> > > Hi - how can I prevent an IWebBrowser2 control from trying to launch a
> > > helper app when loading a url?
>
> > > For example, a URL like this:
>
> > >http://api.flickr.com/services/feeds/geo/?id=19773663@N00&lang=en.> > > tries to launch Google Earth if it's installed, otherwise it brings up
> > > a dialog box asking what to do with the file. Can I prevent both of
> > > these events from happening, and just disregard the page load? Or at
> > > least detect when it's a non-HTML page and cancel the load ??
>
> > Try enabling FEATURE_RESTRICT_FILEDOWNLOAD (see
> > CoInternetSetFeatureEnabled). If that doesn't help, try implementing
> > IInternetSecurityManager, handling
> > ProcessUrlAction(URLACTION_SHELL_FILE_DOWNLOAD) and responding with
> > URLPOLICY_DISALLOW.
> > --
> > With best wishes,
> > Igor Tandetnik
>
> > With sufficient thrust, pigs fly just fine. However, this is not
> > necessarily a good idea. It is hard to be sure where they are going to
> > land, and it could be dangerous sitting under them as they fly
> > overhead. -- RFC 1925
>
> Hi Igor - neither of those helped. I handle both: URLACTION_SHELL_VERB
> and URLACTION_SHELL_FILE_DOWNLOAD and respond wth dis-allow, but that
> code doesn't get hit on that geo link above. I still get prompted with
> a file download box :(
>
> Any other ideas?- Hide quoted text -
>
> - Show quoted text -
I just solved it -- had to implement IDownloadManager and handle the
call to Download(). I just return S_OK to pretend like I handled it.
date: Thu, 7 Aug 2008 13:14:19 -0700 (PDT)
author: Dave Brown
Re: Determine which app handles a URL
Hi Dave,
Just ran accross your post and I just recently had the same problem. In my
case, there where some images I needed from a particular site but their
script dissabled the right-click context menu. I came across a Mozilla
pluggin which allowed you to selectively allow or block a helper app's or
scripts behaviour. I haven't looked but there may be a similar pluggin
available for IE. Just FYI since you where able to resolve it anyways.
"Dave Brown" wrote in message
news:115d526d-f017-4807-a2dc-ff0f8f259f61@b2g2000prf.googlegroups.com...
On Aug 7, 12:01 pm, Dave Brown wrote:
> On Aug 7, 5:06 am, "Igor Tandetnik" wrote:
>
>
>
>
>
> > "Dave Brown" wrote in message
>
> >news:2688928f-6029-471a-b125-e309fabb4a6b@v13g2000pro.googlegroups.com
>
> > > Hi - how can I prevent an IWebBrowser2 control from trying to launch a
> > > helper app when loading a url?
>
> > > For example, a URL like this:
>
> > >http://api.flickr.com/services/feeds/geo/?id=19773663@N00&lang=en...
>
> > > tries to launch Google Earth if it's installed, otherwise it brings up
> > > a dialog box asking what to do with the file. Can I prevent both of
> > > these events from happening, and just disregard the page load? Or at
> > > least detect when it's a non-HTML page and cancel the load ??
>
> > Try enabling FEATURE_RESTRICT_FILEDOWNLOAD (see
> > CoInternetSetFeatureEnabled). If that doesn't help, try implementing
> > IInternetSecurityManager, handling
> > ProcessUrlAction(URLACTION_SHELL_FILE_DOWNLOAD) and responding with
> > URLPOLICY_DISALLOW.
> > --
> > With best wishes,
> > Igor Tandetnik
>
> > With sufficient thrust, pigs fly just fine. However, this is not
> > necessarily a good idea. It is hard to be sure where they are going to
> > land, and it could be dangerous sitting under them as they fly
> > overhead. -- RFC 1925
>
> Hi Igor - neither of those helped. I handle both: URLACTION_SHELL_VERB
> and URLACTION_SHELL_FILE_DOWNLOAD and respond wth dis-allow, but that
> code doesn't get hit on that geo link above. I still get prompted with
> a file download box :(
>
> Any other ideas?- Hide quoted text -
>
> - Show quoted text -
I just solved it -- had to implement IDownloadManager and handle the
call to Download(). I just return S_OK to pretend like I handled it.
date: Wed, 13 Aug 2008 05:34:56 -0500
author: FD_Tech
|
|