Вниз
Скачать: 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.034 c
9-1120298880
Мелкий
2005-07-02 14:08
2005.11.20
Разногласия в единицах измерения в DirectX


2-1131125586
caspersoft
2005-11-04 20:33
2005.11.20
Помогите срочно


2-1131185953
Зм1й
2005-11-05 13:19
2005.11.20
Адекватная реакция :)


2-1130428870
Максим
2005-10-27 20:01
2005.11.20
Массив структур


14-1130318161
Nameless
2005-10-26 13:16
2005.11.20
Архивация/разархивация




   Наверх