본문 바로가기
Study/API

SHGetSpecialFolderPath를 이용하여 특수 경로를 구하기

by 뿡뿡대마왕 2011. 9. 28.
반응형

출처 : Ezbeat 의 도서관 



BOOL SHGetSpecialFolderPath(      
    HWND hwndOwner, //NULL
    LPTSTR lpszPath,  //버퍼
    int csidl,                               
    BOOL fCreate  //TRUE : 폴더경로를 만든다.   ,  FALSE : 폴더를 만들지 않는다.    is FALSE
);

특정 폴더 절대 경로 알아내는 함수

세번째 인자 : 
"CSIDL_DESKTOP   {desktop}"
 "CSIDL_INTERNET  Internet Explorer (icon on desktop)"
 "CSIDL_PROGRAMS  Start Menu\Programs"
 "CSIDL_CONTROLS  My Computer\Control Panel"
 "CSIDL_PRINTERS   My Computer\Printers"
 "CSIDL_PERSONAL  My Documents"
 "CSIDL_FAVORITES  {user name}\Favorites"
 "CSIDL_STARTUP   Start Menu\Programs\Startup"
 "CSIDL_RECENT   {user name}\Recent"
 "CSIDL_SENDTO   {user name}\SendTo"
 "CSIDL_BITBUCKET  {desktop}\Recycle Bin"
 "CSIDL_STARTMENU  {user name}\Start Menu"
 "CSIDL_DESKTOPDIRECTORY {user name}\Desktop"
 "CSIDL_DRIVES   My Computer"
 "CSIDL_NETWORK   Network Neighborhood"
 "CSIDL_NETHOOD   {user name}\nethood"
 "CSIDL_FONTS   windows\fonts"
 "CSIDL_TEMPLATES"
 "CSIDL_COMMON_STARTMENU All Users\Start Menu"
 "CSIDL_COMMON_PROGRAMS All Users\Programs"
 "CSIDL_COMMON_STARTUP  All Users\Startup"
 "CSIDL_COMMON_DESKTOPDIRECTORY All Users\Desktop"
 "CSIDL_APPDATA   {user name}\Application Data"
 "CSIDL_PRINTHOOD  {user name}\PrintHood"
 "CSIDL_LOCAL_APPDATA  {user name}\Local Settings\Application Data (non roaming)"
 "CSIDL_ALTSTARTUP  non localized startup"
 "CSIDL_COMMON_ALTSTARTUP non localized common startup"
 "CSIDL_COMMON_FAVORITES"
 "CSIDL_INTERNET_CACHE"
 "CSIDL_COOKIES"
 "CSIDL_HISTORY"
 "CSIDL_COMMON_APPDATA  All Users\Application Data"
 "CSIDL_WINDOWS  GetWindowsDirectory()"
 "CSIDL_SYSTEM   GetSystemDirectory()"
 "CSIDL_PROGRAM_FILES  C:\Program Files"
 "CSIDL_MYPICTURES  C:\Program Files\My Pictures"
 "CSIDL_PROFILE   USERPROFILE"
 "CSIDL_SYSTEMX86  x86 system directory on RISC"
 "CSIDL_PROGRAM_FILESX86 x86 C:\Program Files on RISC"
 "CSIDL_PROGRAM_FILES_COMMON C:\Program Files\Common"
 "CSIDL_PROGRAM_FILES_COMMONX86 x86 Program Files\Common on RISC"
 "CSIDL_COMMON_TEMPLATES All Users\Templates"
 "CSIDL_COMMON_DOCUMENTS All Users\Documents"
 "CSIDL_COMMON_ADMINTOOLS All Users\Start Menu\Programs\Administrative Tools"
 "CSIDL_ADMINTOOLS  {user name}\Start Menu\Programs\Administrative Tools" 


반응형

댓글