Hi !
I can run SetupDiGetClassDevs with flags:
var flags = onlyPresent
? DsSetupApi.DIGCF_PRESENT | DsSetupApi.DIGCF_DEVICEINTERFACE
: DsSetupApi.DIGCF_DEVICEINTERFACE;
deviceInfoSet = DsSetupApi.SetupDiGetClassDevs(ref guidToCheck, IntPtr.Zero, IntPtr.Zero, flags);
And this works great.
But how can I detect if a device is present or not if I use only DIGCF_DEVICEINTERFACE?
Is there any flag I can check or must I perform a CreateFile and check the error in order to check if it´s present or not?
Greetings
Dominik