Forum Discussion
LD_zhoujianwei
Nov 18, 2023Copper Contributor
SetupDiGetClassDevs error, error code 6: The handle is invalid
hello:
When we used the SetupDiGetClassDevs (&GUID_DEVINTERFACE_STOAGEPORT, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE) interface on Windows server2016 to obtain the handle to our storage device, we found that this interface returned INVALID_ HANDLE_ Value, at this point, our storage device is normal. The next time we call this interface, we will return success, although the probability is very low. We have run it many times, only once.
May I ask when this interface will report an error?
Is there a probability of errors occurring when using this interface normally?
No RepliesBe the first to reply