Do you have Ableton live installed on your system? In that case you must prevent Cubase to load Ableton Live Engine.dll (rewire). The drawback is that you cannot use rewire with Ableton anymore.
Disable all M-Audio midi drivers. Cubase does not like them and cannot unload then at exit.
No more problems on exit anymore!! Try it yourself.