Bewerken

Delen via


StorPortRegistryReadAdapterKey function (storport.h)

The StorPortRegistryReadAdapterKey routine is called by the miniport driver to read the hardware or device registry adapter keys located in registry at HKLM/CurrentControlSet/Enum/Instance path/DeviceParameters/... these keys are read from in the INF DDInstall.HW Section.

Syntax

ULONG StorPortRegistryReadAdapterKey(
  [in]           PVOID  HwDeviceExtension,
  [in, optional] PUCHAR SubKeyName,
  [in]           PUCHAR ValueName,
  [in]           ULONG  ValueType,
  [in, out]      PVOID  *ValueData,
  [in, out]      PULONG ValueDataLength
);

Parameters

[in] HwDeviceExtension

A pointer to the hardware device extension. This is a per HBA storage area that the port driver allocates and initializes on behalf of the miniport driver. Miniport drivers usually store HBA-specific information in this extension, such as the state of the HBA and the mapped access ranges for the HBA. This area is available to the miniport driver immediately after the miniport driver calls StorPortInitialize. The port driver frees this memory when it removes the device. The miniport driver must be running at IRQL PASSIVE_LEVEL when it calls this routine.

[in, optional] SubKeyName

The miniport subkey.

[in] ValueName

The name of the Value under the key.

[in] ValueType

One of the following registry data types.

Type Meaning
REG_SZ Unicode null-terminated string.
REG_EXPAND_SZ Unicode null-terminated string with environment variable references.
REG_BINARY Binary data.
REG_DWORD 32-bit double word.
REG_DWORD_LITTLE_ENDIAN 32-bit double word with a little-endian format.
REG_DWORD_BIG_ENDIAN 32-bit double word with a big-endian format.
REG_LINK Unicode string that specifies a symbolic link.
REG_MULTI_SZ Multiple Unicode strings.
REG_RESOURCE_LIST Resource list in the resource map.
REG_FULL_RESOURCE_DESCRIPTOR Resource list in the hardware description.
REG_RESOURCE_REQUIREMENTS_LIST Resource requirement list.
REG_QWORD 64-bit quadlet number.
REG_QWORD_LITTLE_ENDIAN 64-bit quadlet number with a little-endian format.

[in, out] ValueData

Pointer to the data that contains the registry data to be read. The data is converted from UNICODE to a NULL-terminated ASCII string.

[in, out] ValueDataLength

Specifies the size of the data pointed to by ValueData.

Return value

Returns STOR_STATUS_SUCCESS when the operation is successful, otherwise the appropriate error code.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)
Library Storport.lib
IRQL PASSIVE_LEVEL

See also

StorPortInitialize