BluetoothSdpEnumAttributes function

The BluetoothSdpEnumAttributes function enumerates through the SDP record stream, and calls the callback function for each attribute in the record.

Syntax

BOOL BluetoothSdpEnumAttributes(
  LPBYTE                                 pSDPStream,
  ULONG                                  cbStreamSize,
  PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK pfnCallback,
  LPVOID                                 pvParam
);

Parameters

pSDPStream

Pointer to a valid record stream that is formatted as a single SDP record.

cbStreamSize

Size of the stream pointed to by pSDPStream, in bytes.

pfnCallback

Pointer to the callback routine. See PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK for more information about the callback.

pvParam

Optional parameter to be passed to the callback routine.

Return Value

Returns TRUE if an enumeration occurred. Returns FALSE upon failure. Call the GetLastError function for more information. The following table describes common error codes associated with the BluetoothSdpEnumAttributes function:

Return code Description
ERROR_INVALID_PARAMETER
The pSDPStream or pfnCallback parameter is NULL.
ERROR_INVALID_DATA
The SDP stream is corrupt.

Remarks

If the callback function returns FALSE, the enumeration initiated by the BluetoothSdpEnumAttributes function is stopped.

The record stream in pSDPStreammust be an SDP stream formatted as an SDP record, a SEQUENCE containing attribute ID (UINT16) plus attribute value (any SDP element type) pairs.

Requirements

   
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.dll

See Also

BluetoothSdpGetContainerElementData

BluetoothSdpGetElementData

BluetoothSdpGetString

PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK

SDP_ELEMENT_DATA

SDP_STRING_TYPE_DATA