This interface is implemented by the client application to create temporary pluggable protocol handlers.
The following table shows this interface's methods.
Method | Description |
---|---|
IInternetSession::RegisterMimeFilter | Registers a temporary pluggable MIME filter on the current process. |
IInternetSession::RegisterNameSpace | Registers a temporary pluggable namespace handler on the current process. |
IInternetSession::UnregisterMimeFilter | Unregisters a temporary pluggable MIME filter. |
IInternetSession::UnregisterNameSpace | Unregisters a temporary pluggable namespace handler. |
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Urlmon.h, Urlmon.idl.
Link Library: Urlmon.lib.
© 2005 Microsoft Corporation. All rights reserved.
//========================2013年9月27日11:25:07==================================
This method registers a temporary pluggable namespace handler on the current process.
HRESULT RegisterNameSpace( IClassFactory* pCF, REFCLSID rclsid, LPCWSTR pwzProtocol, ULONG cPatterns, const LPCWSTR* ppwzPatterns, DWORD dwReserved );
Parameters
-
pCF
- [in] Address of an IClassFactory interface where an IInternetProtocol object can be created. rclsid
- [in] Reference to the pluggable namespace handler. 可插拔名字空间的的处理器 //COM对象,必须注册到注册表中,或者用钩子住CocreateInstance pwzProtocol
- [in] String value that contains the protocol to be handled. 协议名称 cPatterns
- [in] Unsigned long integer that indicates the number of elements in the ppwzPatterns parameter. ppwzPatterns
- [in] Array of strings that contain the patterns the handler will be used for. dwReserved
- [in] Reserved. Must be set to zero.
Return Values
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
OS Versions: Windows CE .NET 4.0 and later.
Header: Urlmon.h, Urlmon.idl.
Link Library: Urlmon.lib.