SHGetSpecialFolderPath (Compact 2013)
This function retrieves the path of a special folder, identified by its CSIDL.
BOOL SHGetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, int nFolder, BOOL fCreate );
[in] Handle to the owner window the client should specify if it displays a dialog box or message box.
[in] Address of a character buffer that receives the drive and path of the specified folder. This buffer must be at least MAX_PATH characters in size.
[in] Value specifying the folder for which to retrieve the location. The following table shows the possible values.
File system directory that serves as a common repository for application-specific data.
File system directory that contains file objects in the user's Recycle Bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
File system directory used to physically store file objects on the desktop.
File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
My Computer, which is a virtual folder that contains everything on the local computer: storage devices, and printers. The folder may also contain mapped network drives.
File system directory that serves as a common repository for the user's favorite items.
Virtual folder containing fonts.
Folder that contains music files.
Folder that contains picture files.
Folder that contains video files.
Network Neighborhood Folder, which is a virtual folder that represents the top level of the network hierarchy.
File system directory that serves as a common repository for documents.
Folder that contains the profile of the user.
Program files folder.
File system directory that contains the user's program groups (which are also file system directories).
File system directory that contains the user's most recently used documents.
File system directory that contains Start menu items.
File system directory that corresponds to the user's Startup program group. The system starts these programs when a device is powered on.
[in] 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.
In the standard shell, this function returns TRUE if it is successful and FALSE if it fails.
A number of folders are used frequently by applications, but may not have the same name or location on any given system. CSIDL values provide a unique system-independent way to identify these special folders. The values supersede the use of environment variables for this purpose.
For Windows Embedded Compact a CSIDL is used in conjunction with the shell function SHGetSpecialFolderLocation to retrieve a special folder's path name or item ID list (PIDL). See SHGetSpecialFolderLocation for a list of valid CSIDL values.