BluetoothSdpGetAttributeValue function (bluetoothapis.h)
The BluetoothSdpGetAttributeValue function retrieves the attribute value for an attribute identifier.
Syntax
DWORD BluetoothSdpGetAttributeValue(
[in] LPBYTE pRecordStream,
[in] ULONG cbRecordLength,
[in] USHORT usAttributeId,
[out] PSDP_ELEMENT_DATA pAttributeData
);
Parameters
[in] pRecordStream
Pointer to a valid record stream that is formatted as a single SDP record.
[in] cbRecordLength
Length of pRecordStream, in bytes.
[in] usAttributeId
Attribute identifier to search for. See Remarks.
[out] pAttributeData
Pointer to an SDP_ELEMENT_DATA structure into which the attribute's identifier value is placed.
Return value
Returns ERROR_SUCCESS upon successful completion; the pAddributeData parameter contains the attribute value. Any other return value indicates error. The following table describes common error codes associated with the BluetoothSdpGetAttributeValue function:
Return code | Description |
---|---|
|
Either one of the required pointers was NULL, the pRecordStream parameter was not a valid SDP stream, or the pRecordStream parameter was not a properly formatted SDP record. |
|
The identifier provided in usAttributeId was not found in the record. |
Remarks
The record stream in pRecordStream must be an SDP stream formatted as an SDP record, a SEQUENCE containing attribute ID (UINT16) plus attribute value (any SDP element type) pairs.
The attribute identifier provided in the usAttributeId parameter can be one of the many SDP_ATTRIB_Xxx universal attribute identifiers provided in the bthdef.h file, or a custom attribute value defined by a Bluetooth profile. All values greater than or equal to 0x200 are profile-specific attribute identifiers, and are specific to the profile. See the bthdef.h header file for a list of universal SDP attribute identifiers.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | bluetoothapis.h (include Bthsdpdef.h, BluetoothAPIs.h) |
Library | Bthprops.lib |
DLL | bthprops.cpl |