Andrew Haines wrote:

> Result := GetEnvironmentVariable('HOSTNAME'); This won't work under 
> windows and there is probably a better way to do this with sockets.

GetHostName() or similar. If you use a shell variable it can be spoofed, 
so particularly if running as root go to the lowest-level API available.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to