IKnownFolderManager::Redirect method
Redirects folder requests for common and per-user folders.
Syntax
HRESULT Redirect( [in] REFKNOWNFOLDERID rfid, [in, optional] HWND hwnd, [in] KF_REDIRECT_FLAGS flags, [in, optional] LPCWSTR pszTargetPath, [in] UINT cFolders, [in] KNOWNFOLDERID const *pExclusion, [out] LPWSTR *ppszError );
Parameters
- rfid [in]
-
Type: REFKNOWNFOLDERID
A reference to the KNOWNFOLDERID of the folder to be redirected.
- hwnd [in, optional]
-
Type: HWND
The handle of the parent window used to display copy engine progress UI dialogs when KF_REDIRECT_WITH_UI i passed in the flags parameter. If no progress dialog is needed, this value can be NULL.
- flags [in]
-
Type: KF_REDIRECT_FLAGS
The KF_REDIRECT_FLAGS options for redirection.
- pszTargetPath [in, optional]
-
Type: LPCWSTR
A pointer to the new path for the folder. This is a null-terminated Unicode string. This value can be NULL.
- cFolders [in]
-
Type: UINT
The number of KNOWNFOLDERID values in the array at pExclusion.
- pExclusion [in]
-
Type: KNOWNFOLDERID const*
Pointer to an array of KNOWNFOLDERID values that refer to subfolders of rfid that should be excluded from the redirection. If no subfolders are excluded, this value can be NULL.
- ppszError [out]
-
Type: LPWSTR*
When this method returns, contains the address of a pointer to a null-terminated Unicode string that contains an error message if one was generated. This value can be NULL.
Return value
Type: HRESULT
Returns S_OK if successful, or an error value otherwise, including the following:
| Return code | Description |
|---|---|
|
Among other things, this value can indicate that the rfid parameter references a KNOWNFOLDERID that is not present on the system. Not all KNOWNFOLDERID values are present on all systems. Use IKnownFolderManager::GetFolderIds to retrieve the set of KNOWNFOLDERID values for the current system. |
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also