【发布时间】:2017-10-29 09:06:27
【问题描述】:
我是驱动程序开发的新手,为了方便起见,我想先获得一个简单的设置,我可以在其中编译我的驱动程序并在 Visual Studio 2015 上按 F5 以在我的 VMware 机器上调试它。我尝试过这样做,但遇到了 Google 根本无法帮助我解决的问题。
我的基本设置是一台 Windows 10 x64 VMWare 机器,以串行端口作为目标,Windows 10 x64 作为主机。目标在主机上。
首先,这是我尝试调试驱动程序时在 Visual Studio 中的 windbg 中获得的完整日志:
Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
DESKTOP-AF13U59\Lupe (npipe WinIDE_01D2D83A52532800) connected at Mon May 29 00:13:35 2017
Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Opened \\.\pipe\com_1
Waiting to reconnect...
[00:13:36:302]: Remove Existing Remote Package
[00:13:37:137]: Task "Remove Existing Remote Package" completed successfully
[00:13:37:143]: Copy Driver Package
[00:13:40:517]: Task "Copy Driver Package" completed successfully
[00:13:40:532]: Driver Removal
[00:13:40:532]: Removing any existing files from test execution folder.
[00:13:41:367]: Copying required files for "Driver Removal".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=auxkdb.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=auxkdb.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Removal_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
Error message: Unable to start process
[00:13:50:909]: Driver Preparation
[00:13:50:910]: Removing any existing files from test execution folder.
[00:13:51:745]: Copying required files for "Driver Preparation".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=auxkdb.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=auxkdb.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Preparation_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
Error message: Unable to start process
[00:14:01:351]: Default Driver Package Installation Task
[00:14:01:351]: Removing any existing files from test execution folder.
[00:14:02:185]: Copying required files for "Default Driver Package Installation Task".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DefaultDriverPackageInstallationTask.dll" /select:"@Name='Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation'" /p:"AbsoluteDriverPackagePath=%SystemDrive%\DriverTest\Drivers\auxkdb.inf" /p:"DQ=%SystemDrive%\DriverTest\Drivers\auxkdb.inf" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Default_Driver_Package_Installation_Task_00012.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
Error message: Unable to start process
[00:14:11:710]: Driver Post Install Actions
[00:14:11:711]: Removing any existing files from test execution folder.
[00:14:12:545]: Copying required files for "Driver Post Install Actions".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Post_Install_Actions_00014.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
Error message: Unable to start process
似乎可以将驱动程序文件放入C:\DriverTest\DriversNew,但它永远不会启动驱动程序。
其他基本信息:
- 主机和目标的防火墙均已关闭
- 我可以在主机上按名称 ping 虚拟机
- 我可以用windbg调试同一个端口的VM
- Visual Studio 中的机器显示“已配置用于驱动程序测试”,因此它似乎认为一切正常,至少
我不知道还能提供什么,但the only other occurrence of the problem I could find 是自我回答的,并说通过重新安装Visual Studio、Windows SDK 和WDK 解决了问题。我做了所有这些事情,也尝试过目标是 Windows 7 x64,但问题仍然存在。它也确实创建了 WDKRemoteUser 并登录,之后什么也没有(似乎)。
我将来自this page 的所有链接用于 VS、SDK 和 WDK,所以我认为这不是某种版本不匹配,并且我已经从目标主机上安装了 C:\Program Files (x86)\Windows Kits\10\Remote\x64\WDK Test Target Setup x64-x64_en-us.msi。
有什么想法吗?
【问题讨论】:
标签: c++ visual-studio-2015 vmware