Valery,

You define overkill by a far margin - well, it MAY be.

To implement a handler for a "clickable" protocol in IE all you need is
ONE (!) registry key to be set. Then the hyperlink click will start an
executable with the hyperlink as parameter.

The original poster asked for a class exposed, BUT - maybe he wants to
make something like an email client, look-wise. Actually, I would have
preferred to know more about what he wants to achieve - he wants
something handled from within IE, and if this is as a result for a
hyperlink (like the user clicking on a hyperlink to start an
application), then this is easier.

We use the protocol handler plus a "pickup application" that is then
starting the real app and getting the URL by windows message.

Reference:
http://msdn.microsoft.com/workshop/networking/pluggable/overview/appendi
x_a.asp

Titled: Registering an Application to a URL Protocol

In most cases this is enough :-)

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

-----Original Message-----
From: Valery Pryamikov [mailto:[EMAIL PROTECTED]] 
Sent: Freitag, 10. Mai 2002 09:33
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] custom URL protocol handler

Hi,
        To use it from IE (and other URLMoniker consumers) you have to
implement your own Pluggable Protocol Handler. You can find a couple of
C++ (VC6) samples how to implement your PPH on my webpage
http://home.online.no/~valery. Tim Tabor also has PPH sample on his
website, which you can check. 
Clear .Net solution doesn't quite work, except if you just go interop
way, implement all necessary PPH support+registration and register you
.Net object as COM object. You'll also need to put it into the GAC along
the way, for making it available for any URLMoniker consumer. 
Another way of solving it could be to implement un-managed PPH (in C++)
and host CLR from it. It will give you many more available choices than
going other way around. F.e. just think of the providing you own
Evidence, or/and ApplicationBase/PrivateBinPath, ConfigurationFile and
so fourth. 
Possibilities with the later solution is quite impressive, like f.e. you
can use CodeDOM to dynamically compile and run embedded
Jscript/CSharp/VB.Net code; use .Net remoting for communicating to .Net
remote objects and/or webservices + many-many more.  
And hosting CLR is rather simple and straight-forward task - check
"hosting interfaces.doc" in Tools Developers Guide.

-Valery.

-----Original Message-----
From: David B. Bitton [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 09, 2002 11:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] custom URL protocol handler

Thanks.  I checked out the link, but I'm not seeing how I would use this
to
create my own protocol.  For example, I'd like to be able to put in a
URL
"foo://bar" and have a class handle that accordingly.  Once I have
something
coded, how do I use it, and can I use it in IE on the local machine?

--

David B. Bitton
[EMAIL PROTECTED]
www.codenoevil.com

Code Made Fresh Daily(tm)
----- Original Message -----
From: "Marsh, Drew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 1:45 PM
Subject: Re: custom URL protocol handler


> David B. Bitton [mailto:[EMAIL PROTECTED]] wrote:
>
> > Java 2 allows for the definition of custom URL protocol
> > handlers.  By this, any entity that takes a URL as location
> > for data, you can create a custom protocol (like cvs://), and
> > your custom protocol handler would fetch the data.
> >
> > Can I do this in .NET?
>
> Yup, check out the System.Net.WebRequest architecture, specifically
the
> section called "Programming Pluggable Protocols"[1].
>
> HTH,
> Drew
>
> [1]

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to