Condividi tramite


Funzione WdfCommonBufferGetLength (wdfcommonbuffer.h)

[Si applica solo a KMDF]

Il metodo WdfCommonBufferGetLength restituisce la lunghezza di un buffer comune specificato.

Sintassi

size_t WdfCommonBufferGetLength(
  [in] WDFCOMMONBUFFER CommonBuffer
);

Parametri

[in] CommonBuffer

Handle per un oggetto buffer comune ottenuto dal driver da una chiamata precedente a WdfCommonBufferCreate.

Valore restituito

WdfCommonBufferGetLength restituisce la lunghezza, in byte, del buffer associato al buffer comune specificato dal parametro commonBuffer .

Se il driver fornisce un handle di oggetto non valido, si verifica un controllo di bug.

Osservazioni

Per altre informazioni sui buffer comuni, vedere Using Common Buffers

Esempi

Nell'esempio di codice seguente viene ottenuta la lunghezza di un buffer comune specificato.

size_t bufferLength;

bufferLength = WdfCommonBufferGetLength(DevExt->CommonBuffer); 

Fabbisogno

Requisito Valore
piattaforma di destinazione Universale
versione minima di KMDF 1.0
intestazione wdfcommonbuffer.h (include WdfCommonBuffer.h)
libreria Wdf01000.sys (vedere Controllo delle versioni della libreria framework).
IRQL <= DISPATCH_LEVEL
regole di conformità DDI DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

Vedere anche

WdfCommonBufferCreare