Re: machine with null serial number?
Re: machine with null serial number?
- Subject: Re: machine with null serial number?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 28 Mar 2008 21:00:47 -0700
Apple recommends using the primary MAC (Media Access Layer) address
instead of the machine serial number to uniquely identify a computer
for this purpose. Read:
http://developer.apple.com/technotes/tn/tn1103.html
You can find some code on developer.apple.com named
"GetPrimaryMACAddress.c" for getting this.
Another possible cause of no serial number is that the machine is a so-
called "Hackintosh"; non-Apple hardware modified to run Mac OS X.
I modified GetPrimaryMACAddress.c, adding a Cocoa wrapper and the
ability to handle null MAC addresses by substituting the user's
primary email if the primary MAC address comes up NULL. (It was been
reported to me that Hackintoshes don't report MAC addresses either.)
It's straightforward. The implementation is too long to paste in here
but if anyone wants it I can post it somewhere. Here's the .h:
#import <Cocoa/Cocoa.h>
@interface SSIOKit : NSObject
+ (NSData*)primaryMACAddressData ;
//+ (NSData*)machineSerialNumberData ; // not recommended
@end
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden