Hi, I had the same problem "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)". Here's what I did to fix it.
1. restore the computer to a previous time that I know the dvd drive was working.
2. Copy all the cd driver and save it to a flash drive.
3. Undo the restore.
4. Copy the cd driver back to the system32 folder, replacing the corrupted ones.
5. In device Manager, disable the dvd drive and then re-enable it again and it's back to normal.