Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
La funzione di callback di un driver client EvtMbbDeviceSendServiceSessionData invia i dati della sessione del servizio dispositivo al dispositivo modem.
Sintassi
EVT_MBB_DEVICE_SEND_DEVICE_SERVICE_SESSION_DATA EvtMbbDeviceSendDeviceServiceSessionData;
void EvtMbbDeviceSendDeviceServiceSessionData(
WDFDEVICE Device,
DSS_SESSION_ID SessionId,
WDFMEMORY Data
)
{...}
Parametri
Device
Handle per un oggetto dispositivo framework il driver client ottenuto da una chiamata precedente a WdfDeviceCreate.
SessionId
ID della sessione del servizio dispositivo ottenuta da una chiamata precedente a MbbAdapterGetSessionId.
Data
Oggetto WDFMEMORY contenente i dati da passare al dispositivo.
Valore restituito
Nessuno
Osservazioni
MBBCx richiama l'evtMbbDeviceSendServiceSessionData di un driver client funzione di callback quando un'applicazione invia dati DSS al dispositivo modem. Dopo aver inviato i dati al dispositivo in modo asincrono, il driver client deve chiamare MbbDeviceSendServiceSessionDataComplete in modo che MBBCx possa liberare la memoria allocata per i dati.
Esempio
Nell'esempio seguente viene illustrato come un client potrebbe inviare dati DSS al dispositivo modem. La gestione degli errori è stata interrotta da questo esempio per brevità e chiarezza.
VOID
MyEvtMbbDeviceSendServiceSessionData(
_In_ WDFDEVICE Device,
_In_ DSS_SESSION_ID SessionId,
_In_ WDFMEMORY Data
)
{
// Get the device context and NETADAPTER context
PMY_DEVICE_CONTEXT deviceContext = GetMyDeviceContext(Device);
// Set up a driver-defined DSS packet structure
PMY_DSS_PACKET packet = NULL;
// Get the data to send from the WDFMEMORY object
size_t bufferSize = 0;
PVOID buffer = WdfMemoryGetBuffer(Data,
&bufferSize);
// Populate the DSS packet
packet = MyAllocateDssPacket(Data,
buffer,
bufferSize,
SessionId);
// Send the data asynchronously, which returns STATUS_PENDING when successful
status = MyModemBusWriteData(deviceContext->BusHandle,
packet);
// Increment count of sent packets
deviceContext->DSSPacketsSentCount++;
// Clean up the memory
MbbDeviceSendServiceSessionDataComplete(Data,
status);
MyCleanupDssPacket(packet);
}
Fabbisogno
Requisito | Valore |
---|---|
client minimo supportato | Windows 10, versione 1809 |
piattaforma di destinazione | Universale |
versione minima di KMDF | 1.27 |
intestazione | mbbcx.h |
IRQL | PASSIVE_LEVEL |