Главная страница
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.028 c
14-1130413226
Jeer
2005-10-27 15:40
2005.11.20
Самолет на Кремль


2-1130491512
DEScc
2005-10-28 13:25
2005.11.20
description


2-1130849562
BFG9k
2005-11-01 15:52
2005.11.20
Закрытие программы в OnCreate


2-1130774450
Lexq
2005-10-31 19:00
2005.11.20
Отключение Alt+F4, Ctrl+Alt+del


14-1130316893
ZeRaM
2005-10-26 12:54
2005.11.20
Нужен компонент