A common solution to the device manager code 10 error is updating the drivers for the device that is causing the error. Running the automated windows troubleshooter is another common fix.
While the code 10 error is generally caused by device driver and device compatibility issues, other problems such as missing system updates are sometimes the cause. Simply use windows update to download and install the most recent updates. Corrupted registry entries may also cause a code 10 error but fixing it requires modifying sensitive registry values. Microsoft.com offers a knowledge base article for troubleshooting and fixing corrupted registry entries.