StorPortSetAdapterBusType function (storport.h)

StorPortSetAdapterBusType is used to adjust the bus type of the adapter depending on its current configuration.

Syntax

ULONG StorPortSetAdapterBusType(
  [in] PVOID HwDeviceExtension,
  [in] ULONG BusType
);

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 immediately after the miniport driver calls StorPortInitialize. The port driver frees this memory when it removes the device.

[in] BusType

Contains a STORAGE_BUS_TYPE value that specifies the type of bus-specific configuration data to be set.

Return value

The StorPortSetAdapterBusType routine returns one of the following status codes:

Return code Description
STOR_STATUS_UNSUCCESSFUL This routine was called outside the HwStorFindAdapter function.
STOR_STATUS_SUCCESS This routine completed successfully.
STOR_STATUS_INVALID_PARAMETER BusType is an invalid value.

Remarks

Setting the BusType with this routine will allow you to override the global property set in the miniport INF without having to re-install the driver. This is useful for scenarios such as RAID support or support for multiple adapters with a different bus type.

Requirements

Requirement Value
Minimum supported client Windows 10
Target Platform Universal
Header storport.h (include Storport.h)
Library Storport.lib