Hello. I am using the NeroAPI with
Nero 7.9.6.0. I have run into situations where Nero will stop responding during a burn, and the only way to recover is to kill the process. If the process is killed during a burn, the drive is left in a state where it is locked and waiting for further data from the computer. I am developing an embedded disc burning device, and need a way to recover from this state. Is there a way, using Nero or Windows api, to reset the drive back into a known state? Toggling power to the drive fixes the problem, but this solution is not appropriate for my device.
I have tried the following Windows call to unlock the drive with no success:
DWORD dwBytesReturned;
PREVENT_MEDIA_REMOVAL PMRBuffer;
PMRBuffer.PreventMediaRemoval = false;
BOOL result = DeviceIoControl( driveHandle,
IOCTL_STORAGE_MEDIA_REMOVAL,
&PMRBuffer, sizeof(PREVENT_MEDIA_REMOVAL),
NULL, 0,
&dwBytesReturned,
NULL);
When this call fails, I get the last error from windows, which is "Invalid function". Calling this when the drive is not in the funky state succeeds.
Any help would be appreciated.
Thanks!