Funzione AtaPortRegistryAllocateBuffer (irb.h)

La routine AtaPortRegistryAllocateBuffer alloca un buffer per le operazioni del Registro di sistema.

Nota I modelli di driver di porta ATA e miniport ATA potrebbero essere modificati o non disponibili in futuro. È invece consigliabile usare il driver Storport e i modelli di driver miniport Storport .
 

Sintassi

PVOID AtaPortRegistryAllocateBuffer(
  [in] PVOID ChannelExtension,
       ULONG BufferSize
);

Parametri

[in] ChannelExtension

Puntatore all'estensione del canale.

BufferSize

Specifica la lunghezza del buffer, espressa in byte.

Valore restituito

AtaPortRegistryAllocateBuffer restituisce un puntatore al buffer allocato in caso di esito positivo. In caso contrario, restituisce NULL.

Commenti

Il driver della porta consente al driver miniport di allocare un buffer per tutte le operazioni del Registro di sistema. Dopo che il driver miniport ha allocato un buffer con AtaPortRegistryAllocateBuffer, le chiamate successive ad AtaPortRegistryAllocateBuffer avranno esito negativo e restituiranno NULL. Dopo che il driver miniport libera il buffer allocato con una chiamata alla routine AtaPortRegistryFreeBuffer , può di nuovo allocare buffer chiamando AtaPortRegistryAllocateBuffer.

Il driver miniport deve chiamare AtaPortRegistryAllocateBuffer nella routine AtaChannelInitRoutine o nella routine IdeHwControl . Non può chiamare AtaPortRegistryAllocateBuffer da qualsiasi altra routine. Inoltre, il driver miniport può chiamare AtaPortRegistryAllocateBuffer dalla routine IdeHwControl solo se è stata chiamata la routine IdeHwControl e ha un valore di StartChannel o StopChannel nel parametro ControlAction.

Requisiti

Requisito Valore
Piattaforma di destinazione Desktop
Intestazione irb.h (include Ata.h, Irb.h)
Libreria Ataport.lib; Pciidex.lib

Vedi anche

AtaChannelInitRoutine

AtaPortRegistryFreeBuffer

IdeHwControl