[fpc-pascal] Portable (or at least working) version of GetDomainName()?

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Apr 8 20:54:18 CEST 2013


waldo kitty wrote:
> On 4/8/2013 11:03, Mark Morgan Lloyd wrote:
>> How best to get the (internet-style) domain name of a system? 
>> GetDomainName()
>> appears to be returning "(none)" here on x86 Linux.
> 
> do you mean the FQDN (Fully Qualified Domain Name)??

I mean that on the machine I'm working on the hostname is pye-dev-01 and 
the domain name is telemetry.co.uk. I was under the impression that 
GetDomainName() should return the latter, but apart from anything else 
it's unix-only and whilst Windows is not somewhere I want to go today 
I'd like a portable solution if possible.

-- 
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 fpc-pascal mailing list