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 进行分配。

微型端口驱动程序必须在其 AtaChannelInitRoutine 例程或其 IdeHwControl 例程中调用 AtaPortRegistryControllerKeyRead。 它无法从任何其他例程调用 AtaPortRegistryControllerKeyRead 。 此外,如果微型端口驱动程序的 IdeHwControl 例程已调用,并且其 ControlAction 参数中的值为 StartChannel 或 StopChannel,则微型端口驱动程序只能从其 IdeHwControl 例程调用 AtaPortRegistryControllerKeyRead

要求

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

另请参阅

AtaChannelInitRoutine

AtaPortRegistryAllocateBuffer

IdeHwControl