AtaPortRegistryChannelSubkeyWriteDeferred function (irb.h)

The AtaPortRegistryChannelSubKeyWriteDeferred routine writes data asynchronously to the indicated value name under the registry key HKLM\CurrentControlSet\Services\<service name>\ControllerN\ChannelM, where N is the number of the controller and M is the number of the channel.

Note  The ATA port driver and ATA miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
 

Syntax

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

Parameters

[in] ChannelExtension

A pointer to the channel extension.

[in] ControllerNumber

Contains the controller number.

[in] ValueName

Contains the name of the registry value to write to.

[in] ValueType

Indicates the type of data that is contained in the registry value. This member should be assigned one of values indicated in the following table.

Value Meaning
IDE_REG_DWORD A 4-byte numeric value.
IDE_REG_BINARY Binary data.
IDE_REG_SZ A null-terminated. Unicode string.

[in] Buffer

Pointer to the source buffer that contains the data to be written to the registry.

BufferLength

A pointer to the number of bytes of data to copy. If the operation fails, the location that is pointed to by Length will update to the length of the data that was successfully written to the registry.

Return value

AtaPortRegistryChannelSubKeyWriteDeferred returns TRUE if the operation. Otherwise, it returns FALSE. The routine also returns FALSE if the miniport driver does not call it from the correct routine.

Remarks

If the value name is not present, AtaPortRegistryChannelSubKeyWriteDeferred creates an entry for the value and the data is stored in the newly created value.

The buffer that is pointed to by Buffer must be allocated by using AtaPortRegistryAllocateBuffer.

The miniport driver can call AtaPortRegistryChannelSubKeyWriteDeferred from any of the key routines that belong to its channel interface.

The miniport driver must not reuse the buffer that is pointed to by Buffer after the initial call to AtaPortRegistryChannelSubKeyWriteDeferred. Because the call is asynchronous, Buffer might still point to data that has not been flushed to the registry. The port driver flushes the data in the buffer to the registry when the miniport driver calls AtaPortRegistryFreeBuffer.

Requirements

Requirement Value
Target Platform Desktop
Header irb.h (include Ata.h, Irb.h)

See also

AtaPortRegistryAllocateBuffer

AtaPortRegistryFreeBuffer