你只要看第三个参数就好了,想要得到不同的文件夹路径,传入不同的参数就行。 CSIDL_APPDATA File system directory that serves as a common repository for application-specific data. CSIDL_DESKTOP Not supported on Smartphone. CSIDL_FAVORITES The file system directory that serves as a common repository for the user's favorite items. CSIDL_FONTS The virtual folder that contains fonts. CSIDL_PERSONAL The file system directory that serves as a common repository for documents. CSIDL_PROGRAM_FILES The program files folder. CSIDL_PROGRAMS The file system directory that contains the user's program groups, which are also file system directories. CSIDL_STARTUP The file system directory that corresponds to the user's Startup program group. The system starts these programs when a device is powered on. 我想只看参数的名称你也能猜出是什么文件夹吧 CSIDL_WINDOWS
SHGetSpecialFolderPath(NULL,tcProgramFile,CSIDL_PROGRAM_FILES,0);tcProgramFile中就是Program Files文件夹的路径了
CSIDL_APPDATA File system directory that serves as a common repository for application-specific data. CSIDL_DESKTOP Not supported on Smartphone. CSIDL_FAVORITES The file system directory that serves as a common repository for the user's favorite items. CSIDL_FONTS The virtual folder that contains fonts. CSIDL_PERSONAL The file system directory that serves as a common repository for documents. CSIDL_PROGRAM_FILES The program files folder. CSIDL_PROGRAMS The file system directory that contains the user's program groups, which are also file system directories. CSIDL_STARTUP The file system directory that corresponds to the user's Startup program group. The system starts these programs when a device is powered on. 我想只看参数的名称你也能猜出是什么文件夹吧
CSIDL_WINDOWS