Вниз
Скачать: 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.043 c
9-1120903985
Юра
2005-07-09 14:13
2005.11.20
2-ух мерные игры


1-1130398578
NightLord
2005-10-27 11:36
2005.11.20
Злые звуки


2-1130828309
DimaDima
2005-11-01 09:58
2005.11.20
Требует всё больше памяти.


2-1131096961
TTeK
2005-11-04 12:36
2005.11.20
подсчёт повторяющихся значений или top 10


11-1096632274
Дмитрий Галин
2004-10-01 16:04
2005.11.20
TChart и KOL




   Наверх