자꾸 까먹고 뒤지게 되어서 적어 둠.
아래 3개의 디렉토리는 바로 가기 파일들을 뒤지기에 유용함.


procedure TForm1.Button1Click(Sender: TObject);
const
  QUICK_LAUNCH='\Microsoft\Internet Explorer\Quick Launch';
var
  PathPrograms, PathDesktop, PathQuickLaunch: array [0..MAX_PATH] of Char;
begin
  // 시작 메뉴\프로그램 (C:\Documents and Settings\USER_NAME\시작 메뉴\프로그램)
  SHGetFolderPath(0, CSIDL_PROGRAMS, 0, 0, PathPrograms);   

  // 바탕 화면 (C:\Documents and Settings\USER_NAME\바탕 화면)
  SHGetFolderPath(0, CSIDL_DESKTOP, 0, 0, PathDesktop);

  // 빠른 실행 (C:\Documents and Settings\USER_NAME\Application Data\Microsoft\Internet Explorer\Quick Launch)
  SHGetFolderPath(0, CSIDL_APPDATA, 0, 0, PathQuickLaunch); 
  StrCopy(PathQuickLaunch, PWideChar(PathQuickLaunch+QUICK_LAUNCH));

  // 출력해보아요
  OutputDebugString(PWideChar('시작 메뉴\프로그램 = '+PathPrograms));
  OutputDebugString(PWideChar('바탕 화면 = '+PathDesktop));
  OutputDebugString(PWideChar('빠른 실행 = '+PathQuickLaunch));
end;





Posted by bloodguy
,