I cant get service name
I cant get service name
- Subject: I cant get service name
- From: Johan Malmström <email@hidden>
- Date: Mon, 23 Jan 2006 12:09:25 +0100
- Thread-topic: I cant get service name
First, I'm new to Bluetooth programming so I'm sorry if I'm making a obvious
mistake here but I don't think so. Please advise if so...
In the path of a current project I'm trying to sort out the small details
first, and I'm going through old code that has been given to me, to get me
started so to speak.
In this code I add a service that is defined in a .plist-directory file. I
then try to get the name of the service but I get EXC_BAD_ACCESS when I call
/IOBluetoothSDPServiceRecordGetServiceName/
This is how I do it:
CFPropertyListRef HIDServiceDict = CreateHIDDictionary();
// reads .plist file and creates the dict, as far as I can tell it works all
right
result = IOBluetoothAddServiceDict( (CFDictionaryRef) HIDServiceDict,
&HIDServiceRecord);
if(result == kIOReturnSuccess)
result =
IOBluetoothSDPServiceRecordGetServiceRecordHandle(HIDServiceRecord,
&HBHIDServiceRecordHandle);
if(result == kIOReturnSuccess)
// next line is where I get in to trouble!
CFStringRef ServiceName
=IOBluetoothSDPServiceRecordGetServiceName(HIDServiceRecord));
Should this work?
/ Johan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden