????BOOL SHGetSpecialFolderPath ( HWND hwndOwner?? LPTSTR lpszPath?? int nFolder?? BOOL fCreate);
????hwndOwner ????GetDesktopWindow API????????????
????lpszPath???????·??
????nFolder?????????
????fCreate??true ?????????в???????????false????????
????lpszPath??nFolder????????

nFolder lpszPath
0 C:/Documents and Settings/??????/????
2 C:/Documents and Settings/??????/??????????/????
5 C:/Documents and Settings/??????/My Documents
6 C:/Documents and Settings/??????/Favorites
7 C:/Documents and Settings/??????/??????????/????/???
8 C:/Documents and Settings/??????/Recent
9 C:/Documents and Settings/??????/SendTo
11 C:/Documents and Settings/??????/??????????
13 C:/Documents and Settings/??????/My Documents/My Music
14 C:/Documents and Settings/??????/My Documents/My Videos
16 C:/Documents and Settings/??????/????
19 C:/Documents and Settings/??????/NetHood
20 C:/WINDOWS/Fonts
21 C:/Documents and Settings/??????/Templates
22 C:/Documents and Settings/All Users/??????????
23 C:/Documents and Settings/All Users/??????????/????
24 C:/Documents and Settings/All Users/??????????/????/???
25 C:/Documents and Settings/All Users/????
26 C:/Documents and Settings/??????/Application Data
27 C:/Documents and Settings/??????/PrintHood
28 C:/Documents and Settings/??????/Local Settings/Application Data
31 C:/Documents and Settings/All Users/Favorites
32 C:/Documents and Settings/??????/Local Settings/Temporary Internet Files
33 C:/Documents and Settings/??????/Cookies
34 C:/Documents and Settings/??????/Local Settings/History
35 C:/Documents and Settings/All Users/Application Data
36 C:/WINDOWS
37 C:/WINDOWS/system32
38 C:/Program Files
39 C:/Documents and Settings/??????/My Documents/My Pictures
40 C:/Documents and Settings/??????
43 C:/Program Files/Common Files
45 C:/Documents and Settings/All Users/Templates
46 C:/Documents and Settings/All Users/Documents
47 C:/Documents and Settings/All Users/??????????/????/???????
48 C:/Documents and Settings/??????/??????????/????/???????
53 C:/Documents and Settings/All Users/Documents/My Music
54 C:/Documents and Settings/All Users/Documents/My Pictures
55 C:/Documents and Settings/All Users/Documents/My Videos
56 C:/WINDOWS/resources
59 C:/Documents and Settings/??????/Local Settings/Application Data/Microsoft/CD Burning
??????vc6.0???????????μ?nFolder???????????????????????????????????壺
 
#define CSIDL_DESKTOP                   0x0000
#define CSIDL_INTERNET                  0x0001
#define CSIDL_PROGRAMS                  0x0002
#define CSIDL_CONTROLS                  0x0003
#define CSIDL_PRINTERS                  0x0004
#define CSIDL_PERSONAL                  0x0005
#define CSIDL_FAVORITES                 0x0006
#define CSIDL_STARTUP                   0x0007
#define CSIDL_RECENT                    0x0008
#define CSIDL_SENDTO                    0x0009
#define CSIDL_BITBUCKET                 0x000a
#define CSIDL_STARTMENU                 0x000b
#define CSIDL_DESKTOPDIRECTORY          0x0010
#define CSIDL_DRIVES                    0x0011
#define CSIDL_NETWORK                   0x0012
#define CSIDL_NETHOOD                   0x0013
#define CSIDL_FONTS                     0x0014
#define CSIDL_TEMPLATES                 0x0015
#define CSIDL_COMMON_STARTMENU          0x0016
#define CSIDL_COMMON_PROGRAMS           0X0017
#define CSIDL_COMMON_STARTUP            0x0018
#define CSIDL_COMMON_DESKTOPDIRECTORY   0x0019
#define CSIDL_APPDATA                   0x001a
#define CSIDL_PRINTHOOD                 0x001b
#define CSIDL_ALTSTARTUP                0x001d         // DBCS
#define CSIDL_COMMON_ALTSTARTUP         0x001e         // DBCS
#define CSIDL_COMMON_FAVORITES          0x001f
#define CSIDL_INTERNET_CACHE            0x0020
#define CSIDL_COOKIES                   0x0021
#define CSIDL_HISTORY                   0x0022