Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.048 c
11-1093729013
Sormy
2004-08-29 01:36
2005.11.20
Delphi 7.0 Вылетает...


14-1130737263
Ega23
2005-10-31 08:41
2005.11.20
С днем рождения! 31 октября


14-1130356484
Prohodil Mimo
2005-10-26 23:54
2005.11.20
какая прога умеет вытаскивать иконки из ЕХЕ ?


4-1127275499
RDS
2005-09-21 08:04
2005.11.20
права NTFS


2-1131051303
Toxa_ua
2005-11-03 23:55
2005.11.20
~ ?




   Наверх