SHGetFolderLocation(3w)

SHGetFolderLocation3w

Usage

HRESULT SHGetFolderLocation
(
HWND hwndOwner,
int nFolder,
HANDLE hToken,
DWORD dwReserved,
LPITEMIDLIST* ppidl
)

Overview

Gets the folder locations from the registry and creates a pidl.

Params

hwndOwner [In] .

nFolder [In] CSIDL_xxxxx.

hToken [In] token representing user, or NULL for current user, or -1 for default user.

dwReserved [In] must be zero.

ppidl [Out] PIDL of a special folder.

Returns

Success: S_OK

Failure: Standard OLE-defined error result, S_FALSE or E_INVALIDARG.

Notes

Creates missing reg keys and directories. Mostly forwards to SHGetFolderPathW, but a few values of nFolder return virtual folders that are handled here.

Implementation

Declared in "shlobj.h".

Implemented in "dlls/shell32/shellpath.c".

Debug channel "shell".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.