如何在没有硬件的情况下访问deviceiocontrol功能?

编程入门 行业动态 更新时间:2024-10-27 00:33:43
本文介绍了如何在没有硬件的情况下访问deviceiocontrol功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们试图通过在Readport / writeport数据(地址范围高达0x7f)函数中使用DeviceIoControl函数来测试没有硬件的DLL /驱动程序软件功能,但是我们无法访问它。任何人都可以为它提供样品。这对我们非常有用。谢谢。 我尝试过的事情: 我们已经尝试过DeviceIoControl函数硬编码,但参数正试图访问硬件(驱动程序)。

we are trying to test the dll/driver software functions without hardware, by using the DeviceIoControl function in Readport/writeport data(address range upto 0x7f) function, but we can't able to access it. can any one give the sample for it. it is very useful for us.thank you. What I have tried: we have tried DeviceIoControl function hard code, but the parameters are trying to access the hardware(driver).

推荐答案

所以从你的问题我明白你想要的将IOCTL发送到驱动程序,但在驱动程序代码中,实现不存在。我很有趣你有一个有效的设备句柄。 要进行虚拟植入,你需要更新驱动程序代码,以便用户模式可以有一些虚拟数据。请参阅此链接驱动程序开发第2部分:实施IOCTL简介 [ ^ ]一个想法如何实现IOCTL。 在代码部分的大部分时间里,我验证并从用户缓冲区中提取数据并执行DbgPrint并使用IoCompleteRequest完成请求。请记住,如果您没有驱动程序代码,则无法对此进行任何操作,如何与驱动程序作者联系以支持您的IOCTL调用。 So from you question I understand you want to send IOCTL to a driver, but in the driver code the implementation is not there. I am amusing that you have a valid device handle. To have a dummy implantation you have update the driver code so that user mode can have some dummy data. See this link Driver Development Part 2: Introduction to Implementing IOCTLs[^] to have an idea how to implement IOCTL. In the code section most of the times I validate and extract the data from user buffer and do DbgPrint and complete the request using IoCompleteRequest. Remember if you don't have the driver code there is nothing much you can do about it, how have contact the driver author to support your IOCTL call.

引用:

如何在没有硬件的情况下访问deviceiocontrol功能?

How to access deviceiocontrol function without hardware?

简答:你没有。 驱动程序只与硬件。对于你做的每一个查询,答案来自硬件,所以没有硬件,没有答案。 如此真实或模拟,你需要一个硬件。

Short answer: You don't. The driver only make the link with the hardware. For every query you do, the answer comes from the hardware, so no hardware, no answer. So real or emulated, you need a hardware.

更多推荐

如何在没有硬件的情况下访问deviceiocontrol功能?

本文发布于:2023-05-31 12:02:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/391377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:情况下   功能   硬件   如何在   deviceiocontrol

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!