Get a user friendly device name
Get a user friendly device name
- Subject: Get a user friendly device name
- From: Harald Simon <email@hidden>
- Date: Tue, 11 May 2004 20:18:23 +0200
Hi there,
what is the prefered way to get the user friendly name of a device? --
e.g.: "Internal Modem" or "WebShuttle II COM" instead of "ws.ii_com" --
The network setting dialog within the system preferences shows me, that
there should be a way.
I found the following way:
>
callOutDeviceFile = IORegistryEntryCreateCFProperty(modemService,
>
CFSTR(kIOCalloutDeviceKey),
>
kCFAllocatorDefault,
>
0);
>
>
if (IORegistryEntryGetParentEntry(modemService, kIOServicePlane,
>
&parentEntry) == KERN_SUCCESS)
>
{
>
deviceName = IORegistryEntryCreateCFProperty(parentEntry,
>
CFSTR("Product Name"),
>
kCFAllocatorDefault,
>
0);
>
IOObjectRelease(parentEntry);
>
}
I am looking at the key "Product Name" of the parent registry entry.
-- I am really not shure, whether this key is a standard key. This is
not working for the internal modem. But the network settings dialog
shows the name in the right language.
Best regards
Harald
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.