• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Get a user friendly device name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: cmd-q versus menu item quit
  • Next by Date: Re: Customized NSTextView drawing
  • Previous by thread: Re: Best Cross-Platform Solution
  • Next by thread: ExceptionInInitializerError Exception while invoking NSRuntime in an signed applet...Please help..
  • Index(es):
    • Date
    • Thread