Getting the computer name
Getting the computer name
- Subject: Getting the computer name
- From: Tim Hewett <email@hidden>
- Date: Tue, 14 Dec 2004 15:40:30 +0000
Hello,
I've scoured the manuals, can't seem to find this. I need to
get the name of the computer, e.g. "Fred Blogg's Computer".
I've tried gethostname() but this gives "Fred-Blogg's-
Computer.local", and this changes to something set by the
network service provider when you go online.
Is there some function which will always return the actual
computer name in the form of "Fred Blogg's Computer"?
BTW I have more or less cracked performing drag and drop
from a NSBrowser (including creating a drag image from
visible multiply-selected items - not trivial at all). I can post
sample code but if someone knows that something good
already exists then please tell me so I can see if my approach
is over-complex. There doesn't appear to be anything in
/Developer/Examples or at developer.apple.com. It is a
subject that seems to crop up regularly so I'd be happy to
post some sample code if anyone is interested. It was based
on a sample posted by someone here about a year ago but
has been enhanced quite a bit
Regards,
Tim.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden