Главная страница
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.031 c
2-1130604971
Alex7
2005-10-29 20:56
2005.11.20
свойство "Parent"


9-1120370383
Tratata
2005-07-03 09:59
2005.11.20
Книга по 3Д


14-1130755482
WondeRu
2005-10-31 13:44
2005.11.20
Плагины и менюшки!


14-1130588683
Sergey_R
2005-10-29 16:24
2005.11.20
ArrauGrid for Delphi7


2-1130472029
Alex7
2005-10-28 08:00
2005.11.20
Раздел Initialization