如何调试基本 csp 微型驱动程序
我想将调试器附加到 Windows 7 上的基本 csp 微型驱动程序。
哪个进程托管驱动程序 .dll?它只是另一个 WUDFHost.exe 吗?
我可以将用户模式调试器附加到该进程吗?
I'd like to attach a debugger to a base csp minidriver on windows 7.
Which process hosts the driver .dll? Is it just another WUDFHost.exe ?
Can I attach a user-mode debugger to that process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
至少在使用 certutil.exe 时。 dll“直接”加载到进程中。
在 Visual Studio 中,可以将 certutil.exe 设置为调试面板中的命令,然后单步执行 minidriver.dll 的代码,从而测试 certutil 如何尝试访问智能卡。
At least when using certutil.exe the .dll is loaded "directly" into the process.
In Visual Studio one can set
certutil.exe
as the command in the Debugging panel and then step into the minidriver.dll's code and thereby test how certutil tries to access the smartcard.我做了简单的愚蠢的日志记录,而不是调试我的微型驱动程序。
使用 certutil 测试微型驱动程序很简单:
调试微型驱动程序的想法是有偏差的。
对于 Windows 10,卡操作有5 秒超时。如果您在 5 秒内没有轮询该卡,您的卡将被操作系统重置。
错误如下所示:
以下是微软对此的说法 :
为了健康调试,您必须引入一个单独的线程,使用
SCardStatus
或SCardGetAttrib
轮询您的卡状态,如 金雅拓做到了I did simple stupid logging instead of debuging of my minidriver.
Testing your minidriver with
certutil
is easy:The idea of debugging a minidriver is bias.
For windows 10 there is a 5 second timeout to operate with a card. If you don't poll the card for 5 second you get your card reset by the operating system.
Here is how the error looks:
Here is what Microsoft says about it:
For healthy debugging you have to introduce a separate thread that polls your card status with
SCardStatus
orSCardGetAttrib
as Gemalto does