SHGetSpecialFolderPathA function

[SHGetSpecialFolderPath is not supported. Instead, use ShGetFolderPath.]

Retrieves the path of a special folder, identified by its CSIDL.

Syntax

BOOL SHGetSpecialFolderPathA(
  HWND  hwnd,
  LPSTR pszPath,
  int   csidl,
  BOOL  fCreate
);

Parameters

hwnd

Type: HWND

Reserved.

pszPath

Type: LPTSTR

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.

csidl

Type: int

A CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail.

fCreate

Type: BOOL

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.

Return Value

Type: BOOL

TRUE if successful; otherwise, FALSE.

Remarks

The Microsoft Internet Explorer 4.0 Desktop Update must be installed for this function to be available.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h, Shlobj_core.h)
Library Shell32.lib
DLL Shell32.dll (version 4.71 or later)