Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.11.20;
Скачать: CL | DM;

Вниз

Как програмно узнать местоположение папки ProgramFiles   Найти похожие ветки 

 
Илья Бобров   (2005-09-18 13:51) [0]

Как програмно узнать местоположение папки ProgramFiles


 
MBo ©   (2005-09-18 14:11) [1]

To get those special folders you use the ShGetSpecialFolderLocation API
function together with ShGetPathFromIDList:

Uses Windows, SysUtils, ActiveX, ShellAPI;

Function GetShellFoldername( folderID: Integer ): String;
 Var
   pidl: PItemIDList;
   buf : Array[0..MAX_PATH] Of Char;
 Begin
   Result := "";
   If Succeeded( ShGetSpecialFolderLocation( GetActiveWindow, folderID,
        pidl ))
   Then Begin
     If ShGetPathfromIDList( pidl, buf ) Then
       Result := buf;
     CoTaskMemFree(pidl);
   End { If }
 End; { GetShellFoldername }

The folderID is one of the CSIDL_* constants defined in unit ShellAPI. For
the desktop folder you use CSIDL_DESKTOP, for the program menu folder
CSIDL_PROGRAMS.

Peter Below



Страницы: 1 вся ветка

Текущий архив: 2005.11.20;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.052 c
2-1131018364
Vetalich
2005-11-03 14:46
2005.11.20
Время задержки (ping)


14-1130485590
Macrodens
2005-10-28 11:46
2005.11.20
Вопрос о Законах


8-1120155066
ronyn
2005-06-30 22:11
2005.11.20
Минимизация названия медиа файла в ListBox


14-1130527269
01e9
2005-10-28 23:21
2005.11.20
Зацените мою игру (delphiX)


14-1130308675
Игорь Шевченко
2005-10-26 10:37
2005.11.20
Кто-нибудь из москвичей идет на SEC(R) ?