Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method registers a temporary pluggable namespace handler on the current process.
Syntax
HRESULT RegisterNameSpace( IClassFactory* pCF, REFCLSID rclsid, LPCWSTR pwzProtocol, ULONG cPatterns, const LPCWSTR* ppwzPatterns, DWORD dwReserved ); |
Parameters
- pCF
-
[in] Address of an IClassFactoryinterface where an IInternetProtocolobject can be created.
- rclsid
-
[in] Reference to the pluggable namespace handler.
- pwzProtocol
-
[in] String value that contains the protocol to be handled.
- cPatterns
-
[in] Unused. Set to 0.
- ppwzPatterns
-
[in] Unused. Set to NULL.
- dwReserved
-
[in] Reserved. Must be set to zero.
Return Value
Returns one of the values shown in the following table.
Value | Description |
---|---|
S_OK |
Success. |
E_FAIL |
The operation failed. |
E_NOINTERFACE |
The class factory could not be obtained. |
Remarks
This method only registers a pluggable namespace handler on the current process. No other processes will be affected by this method.
An application can register a pluggable namespace handler for a particular period of time when it wants to handle requests for some protocols by calling IInternetSession::RegisterNameSpace. If ppwzPatterns and cPatterns are NULL, the registered pluggable namespace handler will be called for all protocol requests. This method can be called multiple times using the same interface to register the different namespaces it wants to handle.
Requirements
Header | urlmon.h, urlmon.idl |
Library | urlmon.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |