// storport.h
STORPORT_API BOOLEAN StorPortReadDriverRegistry(
PVOID DriverObject,
PUCHAR ValueName,
PULONG ValueDataLength,
PVOID ValueData
);
View the official Windows Driver Kit DDI referenceNo description available.
The StorPortReadDriverRegistry function is used by the miniport to read the registry data for a given driver object.
DriverObjectThe driver object for which registry data is to be read.
ValueNameThe name of the registry data to be returned.
ValueDataLengthThe size, in bytes, of the buffer provided for the returned data in the ValueData parameter.
ValueDataThe buffer for the retrieved data.
Returns TRUE if the registry data was read and copied into buffer successfully, otherwise returns FALSE.
The values are located under the driver's service key, for example, HKLM\System\CurrentControlSet\Services\\<*DriverName*>\\<*ValueName*>. The value can be any REG_XXXX type.