[Lazarus] Finding out the Hostname of the Computer.
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Fri Nov 28 10:44:26 CET 2008
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]
More information about the Lazarus
mailing list