| |||||||
| Commercial message | |
| | |
| Nero SDK Discussion Forum This is the official support forum for the Nero Software Development Kit (SDK). The forum is monitored by Ahead engineers |
![]() |
| | Thread Tools |
| | #1 (permalink) |
| New on Forum Join Date: Jul 2007
Posts: 5
| Drive locked / reset drive 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! |
| | |
| | #2 (permalink) |
| New on Forum Join Date: Jul 2007
Posts: 5
| Re: Drive locked / reset drive For anyone interested, the problem ended up being with the state of the drive cache. The drive cache was waiting for more data. Synchronizing the drive cache solved half of the problem. This involved sending SCSI command 0x35 to the drive. The easy way to do this is to download sdparm.exe [http://sg.torque.net/sg/sdparm.html#mozTocId891504]. The difficult way is to write some windows driver code that looks like the following: At this point the drive will respond. However, it is locked. There are two ways to fix this. The first way is to use sdparm.exe again. The second way is to unlock the drive using Windows driver code that looks like the following: In both accounts, sdparm is nicer. However, with the unlocking of the drive, I am not sure if there are any window side software locks being used in addition to the hardware lock on the drive. So, for unlocking it may be safer to do the windows call. You will need to download the Windows driver development kit in order to compile it, though. |
| | |
| |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD drive locked | xiu | General Software | 20 | 17-04-2008 15:17 |
| locked drive | jasperado | Firmware | 3 | 04-05-2005 06:37 |
| I've Locked my DVD Drive to Region 1? | dennis dee | General Hardware Forum | 4 | 16-07-2004 15:05 |
| drive speed locked | therockscott | NEC / Optiarc Burner | 8 | 27-05-2004 02:20 |
| My Sony CRX810E DVD Combo Drive is zone locked Can I Reset it ? | graeme65 | Newbie Forum | 1 | 27-02-2004 01:58 |