// mbbcx.h
VOID MbbDeviceReceiveDeviceServiceSessionData(
WDFDEVICE Device,
DSS_SESSION_ID SessionId,
WDFMEMORY Data
);
View the official Windows Driver Kit DDI referenceNo description available.
Client drivers call the MbbDeviceReceiveServiceSessionData method to pass received device service session data up to an application through the MBBCx framework.
DeviceA handle to a framework device object the client driver obtained from a previous call to WdfDeviceCreate.
SessionIdThe ID of the device service session obtained from a previous call to MbbAdapterGetSessionId.
DataA driver-allocated WDFMEMORY object containing the data to pass to the application.
For more information, see Handling device service sessions.
The following example shows how a client driver might pass received DSS data to the framework's DSS receive handler.
VOID
MyReceiveDssData(
_In_ PMY_DEVICE_CONTEXT DeviceContext,
_In_ ULONG SessionId,
_In_ PUCHAR InBuffer,
_In_ ULONG InBufferSize
)
{
NTSTATUS status = STATUS_SUCCESS;
WDFMEMORY data;
// Allocate the WDFMEMORY object from the received data buffer
status = WdfMemoryAllocatePreallocated(WDF_NO_OBJECT_ATTRIBUTES,
InBuffer,
InBufferSize,
&data);
// Pass the received data to the framework
if(NT_SUCCESS(status))
{
DeviceContext->DSSPacketsReceivedCount++;
MbbDeviceReceiveServiceSessionData(DeviceContext->WdfDevice,
SessionId,
data);
WdfObjectDelete(data);
}
}