Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Windows


Anar ©   (2002-10-23 12:19:00) 

Как узнать полный путь к папке Windows?


Anar   (2002-10-24 22:55:00) [1]

Да, я в принципе и до тебя справился, но всё равно спасибо.


Jack128   (2002-10-23 20:39:00) [2]

procedure TForm1.Button1Click(Sender: TObject);
var p : PChar;
begin
GetMem(p,MAx_path);
GetWindowsDirectory(p,max_path);
Caption := p;
end;


ZZ   (2002-10-23 18:03:00) [3]

BillyJeans
из Delphi Help:

uSize

Specifies the maximum size, in characters, of the buffer specified by the lpBuffer parameter.This value should be set to at least MAX_PATH to allow sufficient room in the buffer for the path.

Anar
Этот пример нигде и не должен работать :) Попробуй выделить память для WinDir... или в Яndexе поискать примеры (наверняка же есть :))


Anar   (2002-10-23 17:58:00) [4]

Может подскажете нормальный пример?

BillyJeans- не работает в WinXP!!!


BillyJeans   (2002-10-23 17:35:00) [5]

из Delphi Help:

uSize

Specifies the maximum size, in characters, of the buffer specified by the lpBuffer parameter. This value should be set to at least MAX_PATH to allow sufficient room in the buffer for the path.


ZZ   (2002-10-23 17:31:00) [6]

BillyJeans
Поставим вопрос по другому - что такое 255 в твоем примере?


BillyJeans   (2002-10-23 17:26:00) [7]

А так не догадаться...

GetWindowsDirectory( WinDir, 255);


Anatoly Podgoretsky   (2002-10-23 17:00:00) [8]

Дай бог что бы откомпилировалось


ZZ   (2002-10-23 16:53:00) [9]

BillyJeans
Ну и как? Неужели работает???


BillyJeans   (2002-10-23 15:16:00) [10]

procedure TForm1.Button1Click(Sender: TObject);
var
WinDir : pChar;
begin
GetWindowsDirectory(p, 255);
Edit1.Text := WinDir;
end;


Skier   (2002-10-23 12:20:00) [11]

>Anar
GetWindowsDir(...) ?


Наверх

Титульная страница Поиск, карта сайта Написать письмо