Thanks Jonathan Mitchell, John Joyce, Paul Sanders and Jens Alfke.

John:

Bingo! CSCopyMachineName() works perfectly.

To answer your question, I want a human-readable machine identifier, but one that's not tied to the hardware, the way, say, serial number is.
Our Core Data point-of-sale system has 8 machines making sales 
and I'm thinking of tagging each sale, for several reasons.  
Some examples:
    1. to temporarily hide sales that are in progress on other machines.
       I currently do that but in a more awkward way,

2. to know where sales are actually occurring, to get a sense of
       wear and tear on printers and other disposable hardware, etc.

3. Maybe to compare the performance of the different shop floors in
       an employee-independant way.  The director suspects that employees
       who go downstairs become "slackers" :)


Jonathan:

I confirm that

    #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>

allows

NSLog (@"machine %@", NSMakeCollectable (SCDynamicStoreCopyLocalHostName (NULL)));
and, I assume, similar forms, to work.  Who'd a thunk it?

Thanks again to all of you.

Cheers,

Steve

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to