AtaPortRegistryControllerKeyRead 函数 (irb.h)

AtaPortRegistryControllerKeyRead 例程读取与注册表项 HKLM\CurrentControlSet\Services\<service name>\ControllerN下指示的值名称关联的数据,其中 N 是控制器的数量。

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

语法

BOOLEAN AtaPortRegistryControllerKeyRead(
  [in]            PVOID  ChannelExtension,
  [in]            UCHAR  ControllerNumber,
  [in]            PCHAR  ValueName,
  [in]            UCHAR  ValueType,
  [out, optional] PUCHAR Buffer,
                  PULONG BufferLength
);

参数

[in] ChannelExtension

指向通道扩展的指针。

[in] ControllerNumber

包含控制器编号。

[in] ValueName

包含要读取的注册表值的名称。

[in] ValueType

指示注册表值中包含的数据类型。 应为此参数分配下表中指示的值之一。

值类型 意义
IDE_REG_DWORD 4 字节数值。
IDE_REG_BINARY 二进制数据。
IDE_REG_SZ 以 null 结尾的 Unicode 字符串。

[out, optional] Buffer

指向要复制结果的缓冲区的指针。

BufferLength

指向要复制的数据字节数的指针。 如果作由于缓冲区不足而失败,Length 指向的位置将更新到注册表中数据的实际长度。

返回值

AtaPortRegistryControllerKeyRead 如果作成功,则返回 TRUE。 否则,它将返回 FALSE。 如果微型端口驱动程序未从正确的例程调用它,则 AtaPortRegistryControllerKeyRead 例程也会返回 FALSE

言论

必须使用 AtaPortRegistryAllocateBuffer分配 缓冲区 的缓冲区。

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

要求

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

另请参阅

AtaChannelInitRoutine

AtaPortRegistryAllocateBuffer

IdeHwControl