Disabling a physically connected devices which are involved in an IO operation

praveen 0 Reputation points
2024-05-11T11:15:51.6266667+00:00

Problem statement: I'm trying to disable a device using the setup apis, but sometimes I'm experiencing an error due to it is involved in IO operations. Im looking for a way to make a device behave like it is removed physically or in some way to abruptly stop all the current IO operations of a device. Suggest a solution suitable for all kind of devices. I have seen a solution for ejecting a disk drive using the eject control code, however it is not working for other devices like wpd's.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,448 questions
{count} votes