Ver Mensaje Individual
  #1  
Antiguo 22-05-2003
Avatar de jhonny
jhonny jhonny is offline
Jhonny Suárez
 
Registrado: may 2003
Ubicación: Colombia
Posts: 7.070
Reputación: 32
jhonny Va camino a la famajhonny Va camino a la fama
Y esta ultima para saber el nombre del equipo...

Código:
function GetComputerName : String;
var 
   pcComputer : PChar;
   dwCSize    : DWORD;
begin 
   dwCSize := MAX_COMPUTERNAME_LENGTH + 1;
   GetMem( pcComputer, dwCSize );
   try
      if Windows.GetComputerName( pcComputer, dwCSize ) then 
         Result := pcComputer;
   finally
      FreeMem( pcComputer ); 
   end; 
end;
Ejemplo de llamada:

Código:
Label2.Caption:=GetComputerName;
Espero te sirva pa algo
__________________
Lecciones de mi Madre. Tema: modificación del comportamiento, "Pará de actuar como tu padre!"

http://www.purodelphi.com/
http://www.nosolodelphi.com/
Responder Con Cita