Вниз
Скачать: 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.026 c
2-1130738711
kyn66
2005-10-31 09:05
2005.11.20
Проверка новой версии программы.


1-1130326946
BFG9k
2005-10-26 15:42
2005.11.20
Не работает FindClass


2-1130455887
Blur
2005-10-28 03:31
2005.11.20
Как сделать имеджу небольшой блюр ?


14-1130311715
TUser
2005-10-26 11:28
2005.11.20
Доступ к папке


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




   Наверх