IURLSearchHook
The IURLSearchHook interface is used by the browser to translate the address of an unknown URL protocol. When attempting to browse to a URL address that does not contain a protocol, the browser will first attempt to determine the correct protocol from the address. If this is not successful, the browser will create URL Search Hook objects and call each object's Translate method until the address is translated or all of the hooks have been queried.
URL Search Hooks are registered by adding a value that contains the object's CLSID string under the following key in the registry:
HKEY_LOCAL_MACHINE
Software
Microsoft
Internet Explorer
UrlSearchHooks
Remarks
Implement this interface if your application defines a custom URL protocol and if address translation for this protocol is required.
You do not normally use this interface; it is called by the browser. IURLSearchHook Method Description
Translate Called by the browser when the browser cannot determine the protocol of a URL address.
Requirements
Version 4.71 and later of Shell32.dll
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).
Header: Declared in Shlobj.h.
IURLSearchHook::Translate
Called by the browser when the browser cannot determine the protocol of a URL address.
HRESULT Translate(
LPWSTR lpwszSearchURL,
DWORD cchBufferSize
);
Parameters
lpwszSearchURL
Address of a wide character buffer that, on entry, contains the URL address for which the browser is trying to determine the protocol. On exit, this buffer contains the modified URL address if the method was successful. See the return value for more information.
cchBufferSize
Size, in characters, of the buffer at lpwszSearchURL.
Return Values
This method must return one of the following values: S_OK The URL address was completely translated. The lpwszSearchURL parameter contains the full URL address. The browser will not call any other URL Search Hooks and will attempt to browse to the modified address.
S_FALSE The URL address has been partially processed, but further translation is still required. The lpwszSearchURL parameter contains the result of the processing. The browser will continue executing the rest of the URL Search Hooks.
E_FAIL The URL address was not translated. The lpwszSearchURL parameter has not been modified. The browser will continue executing the rest of the URL Search Hooks.
Requirements
Version 4.71 and later of Shell32.dll
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).
Header: Declared in Shlobj.h.