IUrlAccessor4::GetRedirectedURL Method

Gets the redirected URL for the current item.

Syntax

HRESULT GetRedirectedURL(      
    WCHAR wszRedirectedURL[],
    DWORD dwSize,
    DWORD *pdwLength
);

Parameters

  • wszRedirectedURL
    [out]  Receives the redirected URL as a Unicode string, not including the terminating NULL.
  • dwSize
    [in]  Size in TCHARs of wszRedirectedURL, not including the terminating NULL.
  • pdwLength
    [out]  Receives a pointer to the number of TCHARs written to wszRedirectedURL, not including the terminating NULL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

File URLs are not redirected. This method applies only to a content source of HTTP.

If this method is implemented, the URL that is passed to ISearchProtocol::CreateAccessor will be redirected to the value returned by this method. All subsequent relative URL links will be processed based on the redirected URL.