📄 shfolder.h
字号:
// shfolder.h
#ifndef SHFOLDER_H
#define SHFOLDER_H
#ifdef __cplusplus
extern "C" {
#endif
ITEMIDLIST *WINAPI ShOpenItemIdListA ( const char *szPath ) ;
ITEMIDLIST *WINAPI ShOpenItemIdListW ( const wchar_t *szPath ) ;
ITEMIDLIST *WINAPI ShOpenSpecialItemIdList ( int nCsidl ) ;
int WINAPI ShCloseItemIdList ( ITEMIDLIST *pItemIdList ) ;
int WINAPI ShGetPathA ( const ITEMIDLIST *pItemIdList, char *szPath ) ;
int WINAPI ShGetPathW ( const ITEMIDLIST *pItemIdList, wchar_t *szPath ) ;
int WINAPI ShGetDisplayNameA ( const ITEMIDLIST *pItemIdList, char *szDisplayName ) ;
int WINAPI ShGetDisplayNameW ( const ITEMIDLIST *pItemIdList, wchar_t *szDisplayName ) ;
int WINAPI ShGetNameForParsingA ( const ITEMIDLIST *pItemIdList, char *szName ) ;
int WINAPI ShGetNameForParsingW ( const ITEMIDLIST *pItemIdList, wchar_t *szName ) ;
int WINAPI ShGetCsidl ( const ITEMIDLIST *pItemIdList ) ;
int WINAPI ShCompareItemIdList ( const ITEMIDLIST *pItemIdList1, const ITEMIDLIST *pItemIdList2, int *pIsError ) ;
int WINAPI ShEnumItemIdList ( const ITEMIDLIST *pItemIdList, int ( CALLBACK *CallbackProc ) ( ITEMIDLIST *pItemIdList, LPARAM lParam ), unsigned long dwFlags, LPARAM lParam ) ;
int WINAPI ShChangeNotify ( const ITEMIDLIST *pItemIdList ) ;
#define IsDesktopItemIdList(p) ( ! (p)->mkid.cb )
int WINAPI ShExecuteA ( HWND hWnd, const char *szVerb, const ITEMIDLIST *pItemIdList, const char *szArguments, const char *szDirectory, int nShowCmd ) ;
int WINAPI ShExecuteW ( HWND hWnd, const wchar_t *szVerb, const ITEMIDLIST *pItemIdList, const wchar_t *szArguments, const wchar_t *szDirectory, int nShowCmd ) ;
#ifndef SFGAO_STREAM
typedef ULONG SFGAOF ;
#endif
SFGAOF WINAPI ShGetAttributes ( const ITEMIDLIST *pItemIdList ) ;
#ifdef UNICODE
#define ShOpenItemIdList ShOpenItemIdListW
#define ShGetPath ShGetPathW
#define ShGetDisplayName ShGetDisplayNameW
#define ShExecute ShExecuteW
#else
#define ShOpenItemIdList ShOpenItemIdListA
#define ShGetPath ShGetPathA
#define ShGetDisplayName ShGetDisplayNameA
#define ShExecute ShExecuteA
#endif
// for dwFlags ShEnumItemIdList
#define ENUMITEMIDLIST_FOLDER_ONLY 1
#define ENUMITEMIDLIST_FILE_ONLY 2
#define ENUMITEMIDLIST_HIDDEN 4
#define ENUMITEMIDLIST_CLOSE_BY_USER 8
int WINAPI GetSpecialFolderPathA ( HWND hWnd, char *szPath, int nCsidl, int nReserved ) ;
int WINAPI GetSpecialFolderPathW ( HWND hWnd, wchar_t *szPath, int nCsidl, int nReserved ) ;
int WINAPI OpenSpecialFolderA ( HWND hWnd, const char *szVerb, int nCsidl, int nShowCmd ) ;
int WINAPI OpenSpecialFolderW ( HWND hWnd, const wchar_t *szVerb, int nCsidl, int nShowCmd ) ;
int WINAPI ShellChangeNotifyA ( const char *szPathName ) ;
int WINAPI ShellChangeNotifyW ( const wchar_t *szPathName ) ;
#ifdef UNICODE
#define GetSpecialFolderPath GetSpecialFolderPathW
#define OpenSpecialFolder OpenSpecialFolderW
#define ShellChangeNotify ShellChangeNotifyW
#else
#define GetSpecialFolderPath GetSpecialFolderPathA
#define OpenSpecialFolder OpenSpecialFolderA
#define ShellChangeNotify ShellChangeNotifyA
#endif
//////////////////////////////////////////////////
// CSIDL DEFINITION //
//////////////////////////////////////////////////
#if 0 // Windows 2000/XP
// CSIDL_DESKTOP // C:\Documents and Settings\<user name>\僨僗僋僩僢僾
// CSIDL_INTERNET
// CSIDL_PROGRAMS // C:\Documents and Settings\<user name>\僗僞乕僩 儊僯儏乕\僾儘僌儔儉
// CSIDL_CONTROLS
// CSIDL_PRINTERS
// CSIDL_PERSONAL // C:\Documents and Settings\<user name>\My Documents
// CSIDL_FAVORITES // C:\Documents and Settings\<user name>\Favorites
// CSIDL_STARTUP // C:\Documents and Settings\<user name>\僗僞乕僩 儊僯儏乕\僾儘僌儔儉\僗僞乕僩傾僢僾
// CSIDL_RECENT // C:\Documents and Settings\<user name>\Recent
// CSIDL_SENDTO // C:\Documents and Settings\<user name>\SendTo
// CSIDL_BITBUCKET
// CSIDL_STARTMENU // C:\Documents and Settings\<user name>\僗僞乕僩 儊僯儏乕
// CSIDL_MYDOCUMENTS
// CSIDL_MYMUSIC
// CSIDL_MYVIDEO
// CSIDL_DESKTOPDIRECTORY // C:\Documents and Settings\<user name>\僨僗僋僩僢僾
// CSIDL_DRIVES
// CSIDL_NETWORK
// CSIDL_NETHOOD // C:\Documents and Settings\<user name>\NetHood
// CSIDL_FONTS // C:\Windows\Fonts
// CSIDL_TEMPLATES // C:\Documents and Settings\<user name>\Templates
// CSIDL_COMMON_STARTMENU // C:\Documents and Settings\All Users\僗僞乕僩 儊僯儏乕
// CSIDL_COMMON_PROGRAMS // C:\Documents and Settings\All Users\僗僞乕僩 儊僯儏乕\僾儘僌儔儉
// CSIDL_COMMON_STARTUP // C:\Documents and Settings\All Users\僗僞乕僩 儊僯儏乕\僾儘僌儔儉\僗僞乕僩傾僢僾
// CSIDL_COMMON_DESKTOPDIRECTORY // C:\Documents and Settings\All Users\僨僗僋僩僢僾
// CSIDL_APPDATA // C:\Documents and Settings\<user name>\Application Data
// CSIDL_PRINTHOOD // C:\Documents and Settings\<user name>\PrintHood
// CSIDL_LOCAL_APPDATA // C:\Documents and Settings\<user name>\Local Settings\Application Data
// CSIDL_ALTSTARTUP
// CSIDL_COMMON_ALTSTARTUP
// CSIDL_COMMON_FAVORITES // C:\Documents and Settings\All Users\Favorites
// CSIDL_INTERNET_CACHE // C:\Documents and Settings\<user name>\Local Settings\Temporary Internet Files
// CSIDL_COOKIES // C:\Documents and Settings\<user name>\Cookies
// CSIDL_HISTORY // C:\Documents and Settings\<user name>\Local Settings\History
// CSIDL_COMMON_APPDATA // C:\Documents and Settings\All Users\Application Data
// CSIDL_WINDOWS // C:\Windows
// CSIDL_SYSTEM // C:\Windows\system32
// CSIDL_PROGRAM_FILES // C:\Program Files
// CSIDL_MYPICTURES // C:\Documents and Settings\<user name>\My Documents\My Pictures
// CSIDL_PROFILE // C:\Documents and Settings\<user name>
// CSIDL_SYSTEMX86 // C:\Windows\system32
// CSIDL_PROGRAM_FILESX86
// CSIDL_PROGRAM_FILES_COMMON // C:\Program Files\Common Files
// CSIDL_PROGRAM_FILES_COMMONX86
// CSIDL_COMMON_TEMPLATES // C:\Documents and Settings\All Users\Templates
// CSIDL_COMMON_DOCUMENTS // C:\Documents and Settings\All Users\Documents
// CSIDL_COMMON_ADMINTOOLS // C:\Documents and Settings\All Users\僗僞乕僩 儊僯儏乕\僾儘僌儔儉\娗棟僣乕儖
// CSIDL_ADMINTOOLS // C:\Documents and Settings\<user name>\僗僞乕僩 儊僯儏乕\僾儘僌儔儉\傾僋僙僒儕\Windows 僣乕儖\娗棟僣乕儖
#endif
#if 0 // Windows Vista
// CSIDL_DESKTOP // C:\Users\<user name>\Desktop
// CSIDL_PROGRAMS // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
// CSIDL_PERSONAL // C:\Users\<user name>\Documents
// CSIDL_FAVORITES // C:\Users\<user name>\Favorites
// CSIDL_STARTUP // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
// CSIDL_RECENT // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Recent
// CSIDL_SENDTO // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\SendTo
// CSIDL_STARTMENU // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu
// CSIDL_MYMUSIC // C:\Users\<user name>\Music
// CSIDL_MYVIDEO // C:\Users\<user name>\Videos
// CSIDL_DESKTOPDIRECTORY // C:\Users\<user name>\Desktop
// CSIDL_NETHOOD // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts
// CSIDL_FONTS // C:\Windows\Fonts
// CSIDL_TEMPLATES // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Templates
// CSIDL_COMMON_STARTMENU // C:\ProgramData\Microsoft\Windows\Start Menu
// CSIDL_COMMON_PROGRAMS // C:\ProgramData\Microsoft\Windows\Start Menu\Programs
// CSIDL_COMMON_STARTUP // C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
// CSIDL_COMMON_DESKTOPDIRECTORY // C:\Users\Public\Desktop
// CSIDL_APPDATA // C:\Users\<user name>\AppData\Roaming
// CSIDL_PRINTHOOD // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
// CSIDL_LOCAL_APPDATA // C:\Users\<user name>\AppData\Local
// CSIDL_ALTSTARTUP // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
// CSIDL_COMMON_ALTSTARTUP // C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
// CSIDL_COMMON_FAVORITES // C:\Users\<user name>\Favorites
// CSIDL_INTERNET_CACHE // C:\Users\<user name>\AppData\Local\Microsoft\Windows\Temporary Internet Files
// CSIDL_COOKIES // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Cookies
// CSIDL_HISTORY // C:\Users\<user name>\AppData\Local\Microsoft\Windows\History
// CSIDL_COMMON_APPDATA // C:\ProgramData
// CSIDL_WINDOWS // C:\Windows
// CSIDL_SYSTEM // C:\Windows\System32
// CSIDL_PROGRAM_FILES // C:\Program Files
// CSIDL_MYPICTURES // C:\Users\<user name>\Pictures
// CSIDL_PROFILE // C:\Users\<user name>
// CSIDL_SYSTEMX86 // C:\Windows\System32
// CSIDL_PROGRAM_FILESX86 // C:\Program Files
// CSIDL_PROGRAM_FILES_COMMON // C:\Program Files\Common Files
// CSIDL_PROGRAM_FILES_COMMONX86 // C:\Program Files\Common Files
// CSIDL_COMMON_TEMPLATES // C:\ProgramData\Microsoft\Windows\Templates
// CSIDL_COMMON_DOCUMENTS // C:\Users\Public\Documents
// CSIDL_COMMON_ADMINTOOLS // C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
// CSIDL_ADMINTOOLS // C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools
// CSIDL_COMMON_MUSIC // C:\Users\Public\Music
// CSIDL_COMMON_PICTURES // C:\Users\Public\Pictures
// CSIDL_COMMON_VIDEO // C:\Users\Public\Videos
// CSIDL_RESOURCES // C:\Windows\Resources
// CSIDL_CDBURN_AREA // C:\Users\<user name>\AppData\Local\Microsoft\Windows\MasteredBurning\Disc Burning
#endif
#ifndef CSIDL_DESKTOP
#define CSIDL_DESKTOP 0x0000
#endif
#ifndef CSIDL_INTERNET
#define CSIDL_INTERNET 0x0001
#endif
#ifndef CSIDL_PROGRAMS
#define CSIDL_PROGRAMS 0x0002
#endif
#ifndef CSIDL_CONTROLS
#define CSIDL_CONTROLS 0x0003
#endif
#ifndef CSIDL_PRINTERS
#define CSIDL_PRINTERS 0x0004
#endif
#ifndef CSIDL_PERSONAL
#define CSIDL_PERSONAL 0x0005
#endif
#ifndef CSIDL_FAVORITES
#define CSIDL_FAVORITES 0x0006
#endif
#ifndef CSIDL_STARTUP
#define CSIDL_STARTUP 0x0007
#endif
#ifndef CSIDL_RECENT
#define CSIDL_RECENT 0x0008
#endif
#ifndef CSIDL_SENDTO
#define CSIDL_SENDTO 0x0009
#endif
#ifndef CSIDL_BITBUCKET
#define CSIDL_BITBUCKET 0x000a
#endif
#ifndef CSIDL_STARTMENU
#define CSIDL_STARTMENU 0x000b
#endif
#ifndef CSIDL_MYDOCUMENTS
#define CSIDL_MYDOCUMENTS 0x000c
#endif
#ifndef CSIDL_MYMUSIC
#define CSIDL_MYMUSIC 0x000d
#endif
#ifndef CSIDL_MYVIDEO
#define CSIDL_MYVIDEO 0x000e
#endif
#ifndef CSIDL_DESKTOPDIRECTORY
#define CSIDL_DESKTOPDIRECTORY 0x0010
#endif
#ifndef CSIDL_DRIVES
#define CSIDL_DRIVES 0x0011
#endif
#ifndef CSIDL_NETWORK
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -