Hi,
Is there a simple way to determine if a device or a related device is in use from the user space?
Thanks in advance,
JT
Hi,
Is there a simple way to determine if a device or a related device is in use from the user space?
Thanks in advance,
JT
xxxxx@emc.com wrote:
Is there a simple way to determine if a device or a related device is in use from the user space?
What do you mean by “in use”?
There is no single definition of what that means, so there is no single
answer to your question. Try to be more specific.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
If a device can be removed without disrupting the machine, then the device is not in use, otherwise the device is in use in my case. I can use SetupDiChangeState or SetupDiCallClassInstaller with DIF_PROPERTYCHANGE to change the device state and then use SetupDiGetDeviceInstallParams to find out if DI_NEEDREBOOT is set…Calling SetupDiChangeState or SetupDiCallClassInstaller will change the device state. I have to call it again to restore the device state. I really don’t want to do that. Are there any other options to determine if a device is in use without changing its state?
Thanks & Regards,
JT