Accessing Parameters\Device(d) via StorPortRegistryRead()

Hi NTDEVs,

I'm having trouble accessing Parameters\Device(d) registry values when setting the Global parameter of StorPortRegistryRead() to zero.

In fact, if I call StorPortRegistryWrite() I get a new key called Parameters\Device-1...!

All HBAs will read and write values into this key. I also always get Port = 0 when calling StorPortGetSystemPortNumber(). I suspect these conditions are related.

Each HBA has a different slot number but all share the same bus number...

What am I doing wrong? Any hints would be appreciated.

Regards,
Ben

StorPortGetSystemPortNumber() actually returns STOR_STATUS_INVALID_DEVICE_STATE no matter where I call it from.

Does anyone know of any particular HW_INITIALIZATION_DATA or PORT_CONFIGURATION_INFORMATION members that could be related to this behaviour if misconfigured?

I don't think there's much left for me to try and I'm quickly becoming suspicious registry access of Parameter\Device(d) keys has been silently deprecated...

Can anyone confirm they have registry access of Parameter\Device(d) working?