Вниз
Скачать: 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.017 c
1-98634
off
2003-10-17 14:37
2003.10.30
Вывод на печать?


1-98718
Pomashok
2003-10-20 21:27
2003.10.30
Юникод


8-98745
VP
2003-06-30 09:28
2003.10.30
Видео и кодеки


1-98613
COSINUS
2003-10-17 18:19
2003.10.30
Прикручивание ехе-шника к электронному ключу


1-98741
jack128
2003-10-20 14:41
2003.10.30
Обработка исключений в разных потоках




   Наверх