SHGetSpecialFolderPathW function (shlobj_core.h)
[SHGetSpecialFolderPath is not supported. Instead, use SHGetFolderPath.]
Retrieves the path of a special folder, identified by its CSIDL.
BOOL SHGetSpecialFolderPathW( HWND hwnd, [out] LPWSTR pszPath, [in] int csidl, [in] BOOL fCreate );
A pointer to a null-terminated string that receives the drive and path of the specified folder. This buffer must be at least MAX_PATH characters in size.
A CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail.
Indicates whether the folder should be created if it does not already exist. If this value is nonzero, the folder is created. If this value is zero, the folder is not created.
TRUE if successful; otherwise, FALSE.
The Microsoft Internet Explorer 4.0 Desktop Update must be installed for this function to be available.
The shlobj_core.h header defines SHGetSpecialFolderPath as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||shlobj_core.h (include Shlobj.h, Shlobj_core.h)|
|DLL||Shell32.dll (version 4.71 or later)|