I'm trying to create a simple (software) driver using these instructions.
The deployment process seems to execute properly and the build log shows something like:
1> Catalog generation complete.
1> <snip>\Win7Debug\Driver Package\driver.cat
1> Done Adding Additional Store
1> Successfully signed: <snip>\Win7Debug\Driver Package\driver.cat
1>
1> Deploying driver files for project "<snip>\Driver Package\Driver Package.vcxproj". Deployment may take a few minutes...
2>------ Deploy started: Project: Driver, Configuration: Win7 Debug Win32 ------
2> Done Adding Additional Store
2> Successfully signed: <snip>\Win7Debug\Driver.sys
2>
3>------ Deploy started: Project: Driver Package, Configuration: Win7 Debug Win32 ------
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 2 succeeded, 0 failed, 0 skipped ==========
However, when Visual Studio tries to start a debug session, I receive the following error message:
Unfortunately, there's no mention of which file it can't find. I've tried attaching a debugger and hooking kernel32's MessageBox so that maybe I could check the call trace / see which file it is looking for, but VS doesn't like me attaching ollydbg and it brings up a whole lot of other issues.
I've also tried Process Monitor to see what file it is trying to access but it's pretty hard to wade through everything it is doing.
Am I missing something? Anyone can point me in the right direction?
edit1: Did a clean install of both the host as target machine. Followed instructions perfectly: exact same error. Has nobody come across this before?
So the answer is that Visual Studio defaults to Kernel Debugger
rather than Remote Debugger
. Changing this at least got it to deploy and install the driver, but still caused the build process to hang forever.
I've given up on trying to write a KMDF driver and will instead opt for a global hook via SetWindowsHookEx
instead. Not something I preferred, but the process for writing a kernel mode driver in Windows is way too tedious in my eyes.