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

Как определить имя компьютера?   Найти похожие ветки 

← →
Term ©   (2003-10-21 12:04) [0]

Как определить имя компьютера?


← →
Skier ©   (2003-10-21 12:05) [1]

API GetComputerName(...)


← →
Term ©   (2003-10-21 12:21) [2]

а можно прмерчик, а то чтото я в своём справочнике функций её не нашёл...


← →
Skier ©   (2003-10-21 12:22) [3]

The GetComputerName function retrieves the computer name of the current system. This name is established at system startup, when it is initialized from the registry.

BOOL GetComputerName(

LPTSTR lpBuffer, // address of name buffer
LPDWORD nSize // address of size of name buffer
);


Parameters

lpBuffer

Points to a buffer to receive the null-terminated character string containing the computer name.

nSize

Points to a variable that specifies the maximum size, in characters, of the buffer. This value should be large enough to contain MAX_COMPUTERNAME_LENGTH + 1 characters.



Return Values

If the function succeeds, the return value is nonzero and the variable represented by the nSize parameter contains the number of characters copied to the destination buffer, not including the terminating null character.


← →
Илайдж ©   (2003-10-21 12:26) [4]


function GetMyComputerName:String;
var N:Cardinal;
Buf: array [0..MAX_COMPUTERNAME_LENGTH + 1] of AnsiChar;
begin
N:=SizeOf(Buf)-1;
Windows.GetComputerName(Buf, N);
Result:=PChar(@Buf[0]);
end;


← →
Term ©   (2003-10-21 12:29) [5]


> Илайдж © (21.10.03 12:26) [4]

спасибо


← →
Zergling ©   (2003-10-21 12:37) [6]

А тебе Skier © спасибо не будет. Будешь знать, как из Helpa справку на английском приводить ;-)))).


← →
Skier ©   (2003-10-21 12:48) [7]

>Zergling © (21.10.03 12:37) [6]

> А тебе Skier © спасибо не будет.

Не очень-то и хотелось ! :)


← →
Term ©   (2003-10-21 12:51) [8]

да ладно всем спасибо, я никого не хотел обижать и Skier"у я тоже благодарен, порой носом тоже полезно ткнуть, вследующий раз буду знать где лазить...
но примерчик конечно ценнее :))


← →
Anatoly Podgoretsky ©   (2003-10-21 12:57) [9]

Skier © (21.10.03 12:48) [7]
Он это к тому, что не надо приводить текст, достаточно ссылки на тему справки, у него же есть она?



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

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



Память: 0.46 MB
Время: 0.018 c
1-98573
dimonf
2003-10-20 10:38
2003.10.30
Подскажите, как поместить своего Expert-а в главное меню Delphi?


6-98759
Неумеха
2003-09-05 14:28
2003.10.30
Web-страницы через ShellExecute


1-98576
Аноним
2003-10-20 08:48
2003.10.30
Мышь в Pascal e


1-98581
leon5
2003-10-20 10:34
2003.10.30
Перемещения запятой на 1 порядок..


9-98426
vitas
2003-04-20 18:44
2003.10.30
Авторские права




   Наверх