Class UrlProtocol
- Namespace
- ZeroInstall.DesktopIntegration.Windows
- Assembly
- ZeroInstall.DesktopIntegration.dll
Contains control logic for applying UrlProtocol and UrlProtocol on Windows systems.
public static class UrlProtocol
- Inheritance
-
UrlProtocol
- Inherited Members
Fields
ProtocolIndicator
The registry value name used to indicate that a programmatic identifier is actually a ULR protocol handler.
public const string ProtocolIndicator = "URL Protocol"
Field Value
RegKeyUserVistaUrlAssoc
The HKCU registry key where Windows Vista and newer store URL protocol associations.
public const string RegKeyUserVistaUrlAssoc = "Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations"
Field Value
Methods
Register(FeedTarget, UrlProtocol, IIconStore, bool, bool)
Registers a URL protocol in the current system.
public static void Register(FeedTarget target, UrlProtocol urlProtocol, IIconStore iconStore, bool machineWide, bool accessPoint = false)
Parameters
target
FeedTargetThe application being integrated.
urlProtocol
UrlProtocolThe URL protocol to register.
iconStore
IIconStoreStores icon files downloaded from the web as local files.
machineWide
boolRegister the URL protocol machine-wide instead of just for the current user.
accessPoint
boolIndicates that the handler shall become the default handler for the protocol.
Exceptions
- OperationCanceledException
The user canceled the task.
- IOException
A problem occurred while writing to the filesystem or registry.
- WebException
A problem occurred while downloading additional data (such as icons).
- UnauthorizedAccessException
Write access to the filesystem or registry is not permitted.
Unregister(UrlProtocol, bool, bool)
Unregisters a URL protocol in the current system.
public static void Unregister(UrlProtocol urlProtocol, bool machineWide, bool accessPoint = false)
Parameters
urlProtocol
UrlProtocolThe URL protocol to remove.
machineWide
boolUnregister the URL protocol machine-wide instead of just for the current user.
accessPoint
boolIndicates that the handler was the default handler for the protocol.
Exceptions
- IOException
A problem occurred while writing to the filesystem or registry.
- UnauthorizedAccessException
Write access to the filesystem or registry is not permitted.