I am trying to find a way to regain control over a cdrom drive when a burning program was burning to the drive, then is terminated before completion. When the burning program is terminated, the drive is left in a state where it is locked and will not open. I have tried to unlock the drive using the code below:
PMRBuffer.PreventMediaRemoval = fPreventRemoval;
BOOL result = DeviceIoControl( hVolume,
This code works if the drive has been locked normally, but does not work in my case. Does anyone know of a windows call that will effectively reset the drive? The solution should allow me to get the drive back into a known state.