IUrlAccessor::GetRedirectedURL method (searchapi.h)

Gets the redirected URL for the current item.

Syntax

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

Parameters

[out] wszRedirectedURL

Type: WCHAR[]

Receives the redirected URL as a Unicode string, not including the terminating NULL.

[in] dwSize

Type: DWORD

Size in TCHARs of wszRedirectedURL, not including the terminating NULL.

[out] pdwLength

Type: DWORD*

Receives a pointer to the number of TCHARs written to wszRedirectedURL, not including the terminating NULL.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

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.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2, Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header searchapi.h
Redistributable Windows Desktop Search (WDS) 3.0