향수 님이 쓰신 글 :
: 휴지통의 파일 경로를 얻기 위해서
:
: GetSpecialFolderPath(CSIDL_BITBUCKET);
: 호출하여
: 하단처러 처리를 해보았습니다..근데 휴지통만 가상? 경로라서 그런지.. 경로를 얻지못합니다..
:
: 다른 방법이 있을까요..?
:
:
: String __fastcall InternetCleaner::GetSpecialFolderPath(int nFolder)
: {
: char path[MAX_PATH];
: AnsiString strPath("");
: LPITEMIDLIST piidl;
: try
: {
: if(SHGetSpecialFolderLocation(NULL,nFolder,&piidl)!=NOERROR) return strPath;
: if(!SHGetPathFromIDList(piidl, path)) return strPath;
: strPath=path;
: //if(strPath[strPath.Length()]!='\\') strPath=strPath+"\\";
: }
: catch(Exception &e)
: {
: }
: return strPath;
: }
참고: http://stackoverflow.com/questions/936397/finding-the-recycle-bin-on-a-local-ntfs-drive
|