- m_szName = CFStringGetCStringPtr (
- (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)),
- CFStringGetSystemEncoding()
- );
+ m_szProductName = wxMacCFStringHolder( (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), false ).AsString();
+
+ CFNumberRef nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductIDKey));
+
+ if (nref)
+ CFNumberGetValue(
+ nref,
+ kCFNumberIntType,
+ &m_nProductId
+ );
+
+ nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDVendorIDKey));
+ if (nref)
+ CFNumberGetValue(
+ nref,
+ kCFNumberIntType,
+ &m_nManufacturerId
+ );