If you've been banging your head against the wall on this error, and you are trying to install a 64 bit driver on Windows 7 x64 or Windows Vista x64, the problem might simply be due to the ServiceBinary property of your inf file referencing the 32 bit driver (.sys) rather than the 64 bit.
Make sure then that you have something like:
ServiceBinary = %12%\mydriver_x64.sys
and try again. Might work better this time around.