AtaPortRegistryAllocateBuffer 函数 (irb.h)

AtaPortRegistryAllocateBuffer 例程为注册表作分配缓冲区。

注意 ATA 端口驱动程序和 ATA 微型端口驱动程序模型将来可能会更改或不可用。 相反,我们建议使用 Storport 驱动程序Storport 微型端口 驱动程序模型。
 

语法

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

参数

[in] ChannelExtension

指向通道扩展的指针。

BufferSize

指定缓冲区的长度(以字节为单位)。

返回值

AtaPortRegistryAllocateBuffer 返回指向成功时分配的缓冲区的指针。 否则,它将返回 NULL

言论

端口驱动程序使微型端口驱动程序能够为其所有注册表作分配一个缓冲区。 微型端口驱动程序分配了具有 AtaPortRegistryAllocateBuffer的缓冲区后,稍后调用 AtaPortRegistryAllocateBuffer 将失败并返回 NULL。 微型端口驱动程序通过调用 AtaPortRegistryFreeBuffer 例程释放分配的缓冲区后,它可以通过 调用 AtaPortRegistryAllocateBuffer再次分配缓冲区。

微型端口驱动程序必须在其 AtaChannelInitRou tine 例程或 IdeHwControl 例程中调用 AtaPortRegistryAllocateBuffer。 它无法从任何其他例程调用 AtaPortRegistryAllocateBuffer。 此外,微型端口驱动程序只能从其 IdeHwControl 例程调用 AtaPortRegistryAllocateBuffer,前提是调用其 IdeHwControl 例程,并且其 ControlAction 参数中具有 StartChannelStopChannel 的值。

要求

要求 价值
目标平台 桌面
标头 irb.h (包括 Ata.h、Irb.h)
Ataport.lib;Pciidex.lib

另请参阅

AtaChannelInitRoutine

AtaPortRegistryFreeBuffer

IdeHwControl