Вниз
Скачать: 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.015 c
4-98941
NavigatorV
2003-08-27 00:51
2003.10.30
панель управления


3-98433
IronHawk
2003-10-10 18:54
2003.10.30
Приветствую Мастеров! Автоинкремент в DBF-e, реально?


1-98667
Ilg
2003-10-20 18:40
2003.10.30
Вкладки TPageControl


3-98511
bss
2003-10-09 11:42
2003.10.30
Как в SQL-операторе SELECT вывести разницу в днях между датами?


3-98462
zergey
2003-10-10 10:28
2003.10.30
запросы клиента




   Наверх