// bthsdpddi.h
PCONVERTTREETOSTREAM Pconverttreetostream;
NTSTATUS Pconverttreetostream(
PSDP_TREE_ROOT_NODE Root,
PUCHAR *Stream,
PULONG Size,
ULONG tag
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The Bluetooth SdpConvertTreeToStream function is used to produce a raw bytestream representation of an SDP record from a tree representation. The raw bytestream version is suitable for publication on a local SDP server.
RootThe root node of the tree-based representation of the SDP record to convert into a stream-based representation.
StreamA pointer to the buffer that receives the converted SDP stream.
SizeThe address of an unsigned long integer to receive the length of the converted SDP stream.
tagSpecifies a 4-byte pool tag that uniquely identifies the driver that does the memory allocation. For more information about pool tags, see ExAllocatePoolWithTag.
Possible return values include:
STATUS_INSUFFICIENT_RESOURCES
STATUS_INVALID_PARAMETER
The SdpConvertTreeToStream function performs the opposite operation as the SdpConvertStreamToTree function. It generates a complete native SDP record from a Microsoft-specific tree structure. Driver developers might find it more convenient to build a SDP record as a tree and then convert it to a stream prior to publishing.
SdpConvertTreeToStream allocates the necessary memory to store the stream version of the SDP record. When the memory is no longer needed, the caller is responsible for freeing the memory using the ExFreePool driver support routine.
Bluetooth profile drivers can obtain a pointer to this function through the BTHDDI_SDP_PARSE_INTERFACE.