Вниз
Скачать: CL | DM;

Директория Windows   Найти похожие ветки 

← →
Stype ©   (2005-02-08 17:23) [0]

Как узнать директорию, где установленна Windows ?


← →
palva ©   (2005-02-08 18:48) [1]

{$APPTYPE CONSOLE}
uses windows;
var s: String;
begin
 SetLength(s, 250);
 SetLength(s, GetWindowsDirectory(PChar(s), 250));
 writeln(s);
end.


← →
VMcL ©   (2005-02-08 19:01) [2]

>>palva ©   (08.02.05 18:48) [1]

Только не 250, а MAX_PATH.


← →
palva ©   (2005-02-08 19:07) [3]

OK


← →
palva ©   (2005-02-08 19:12) [4]

Можно даже так:
{$APPTYPE CONSOLE}
uses windows;
var s: String;
begin
 SetLength(s, GetWindowsDirectory(PChar(s), 0));
 GetWindowsDirectory(PChar(s), Length(s));
 writeln(s);
end.


← →
rdm ©   (2005-02-08 22:22) [5]

Caption := SysUtils.GetEnvironmentVariable("windir");


← →
VMcL ©   (2005-02-08 22:51) [6]

>>rdm ©   (08.02.05 22:22) [5]

Так делать не следует. Переменную окружения можно изменить.


← →
Piter ©   (2005-02-08 23:29) [7]

Директория с Windows это - %SystemRoot%


← →
VMcL ©   (2005-02-09 01:02) [8]

>>Piter ©   (08.02.05 23:29) [7]

В Win9x нет SystemRoot, есть только windir, AFAIR.


← →
Fay ©   (2005-02-09 03:38) [9]

2 VMcL ©   (08.02.05 19:01) [2]
uSize
[in] Specifies the maximum size, in TCHARs, of the buffer specified by the lpBuffer parameter. This value should be set to MAX_PATH+1 to allow sufficient space for the path and the null terminator.


← →
Fay ©   (2005-02-09 03:39) [10]

2 Piter ©   (08.02.05 23:29) [7]
Директория с Windows - это GetWindowsDirectory



Страницы: 1 вся ветка

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



Память: 0.46 MB
Время: -0.969 c
6-1102082873
Shamansky
2004-12-03 17:07
2005.02.20
Скачивание файла с сервера


1-1107379949
suharew
2005-02-03 00:32
2005.02.20
Как писать в файл занятый другим приложением.


14-1106646395
M234
2005-01-25 12:46
2005.02.20
C# и Java


1-1107356806
GoZilla
2005-02-02 18:06
2005.02.20
Кто знает, что это за ошибка?


6-1102620516
Rinat
2004-12-09 22:28
2005.02.20
IDUDPClient




   Наверх