Monday, January 21, 2013

BLUETOOTH



The Bluetooth SdpFreeTree function is used to free the memory allocated for the tree-based representation of an SDP record.

Syntax

C++ NTSTATUS SdpFreeTree( _In_  PSDP_TREE_ROOT_NODE Tree );

Parameters

Tree [in]The root node of the SDP tree-based representation to be freed.

Return value

Possible return values include:

Remarks

Callers should perform an SdpFreeTree call when the tree-based representation of an SDP record is no longer needed. TheSdpCreateNodeTree and SdpConvertStreamToTree functions allocate the memory for the tree representations of SDP records that they create. The SdpFreeTree function releases the memory allocated to the SDP_TREE_ROOT_NODE structure that these functions create and all SDP_NODE structures associated with the tree representation.Bluetooth profile drivers can obtain a pointer to the SdpFreeTree function through the BTHDDI_SDP_NODE_INTERFACEstructure.

Requirements

VersionVersions: Supported in Windows Vista, and later.HeaderSdplib.h (include BthSdpddi.h)IRQL<= PASSIVE_LEVEL

See also

SdpCreateNodeTreeSdpConvertStreamToTreeSDP_TREE_ROOT_NODESDP_NODEBTHDDI_SDP_NODE_INTERFACE 

After a profile driver submits a Service Discovery Protocol (SDP) record to advertise its services with SDP, other devices can discover these services by either searching specifically for the record or by browsing to find it.To search for SDP records, a client profile driver must first use IOCTL_BTH_SDP_CONNECT to connect to the SDP service of the remote device.A profile driver can then use one of the following IOCTLs to perform the actual SDP record search:IOCTL_BTH_SDP_ATTRIBUTE_SEARCH obtains all components of a remote SDP record that fall into a specified SDP attribute range.IOCTL_BTH_SDP_SERVICE_SEARCH issues an SDP request to the remote device, requesting handles to SDP records of a particular service class or classes.IOCTL_BTH_SDP_SERVICE_ATTRIBUTE_SEARCH combines IOCTL_BTH_SDP_ATTRIBUTE_SEARCH and IOCTL_BTH_SDP_SERVICE_ATTRIBUTE_SEARCH and returns a usable SDP record stream in a single operation.Profile drivers can use IOCTL_BTH_SDP_SERVICE_SEARCH and IOCTL_BTH_SDP_ATTRIBUTE_SEARCH to reduce the amount of SDP traffic transmitted across a Bluetooth link and can extract necessary information by using a small number of maximum transfer units (MTUs). If neither of these issues is of great concern, it can be more convenient for profile drivers to call IOCTL_BTH_SDP_SERVICE_ATTRIBUTE_SEARCH.After the profile driver has obtained the dynamic protocol/service multiplexer (PSM) for the desired service, it can connect to the remote service by using the BRB_L2CA_OPEN_CHANNEL BRB.Note  If the service has a fixed PSM, which many do, L2CAP client profile drivers do not need to use SDP to obtain the PSM. However, L2CAP client profile drivers can still use SDP to get the SDP server attributes.When the profile driver finishes searching, it should use IOCTL_BTH_SDP_DISCONNECT to disconnect from the remote SDP server. 


http://msdn.microsoft.com/en-us/library/windows/hardware/ff536585(v=vs.85).aspx


No comments:

Post a Comment