You might need to get and use “lsiutil” to change the port settings. In my case, some ports had initiator or responder mode disabled which prevented the controller from detecting my SAS expander.
If it starts with //, its value is ignored, which makes no sense at all.
Looks like you can’t work around that one, sorry.
-2 means that the file was not found. Install linux-firmware or whatever the name for the linux firmware package is of your distro. Install it and reboot. Then that error should be gone. If it’s not, double check if $something_mc.bin exists and check where to get it. It might just not be packaged by the …
Trying to reuse the handle in other registry functions returns ERROR_INVALID_HANDLE. Close the handle and open a new one with the parameters you opened the original one with. Then try to use that one. That should work.
When using the Windows setupapi function SetupDiGetDriverInfoDetailA, it can set the thread local error variable to ERROR_INSUFFICIENT_BUFFER or ERROR_INVALID_USER_BUFFER. The two mean basically the same thing: Your buffer is too small. The SP_DRVINFO_DETAIL_DATA_A struct has a dynamically sized tail that contains the Hardware IDs. ERROR_INVALID_USER_BUFFER means that that dynamically sized area is too small.