Code Monkey home page Code Monkey logo

Comments (5)

samtertzakian avatar samtertzakian commented on May 18, 2024 1

Hi, Hans,
I have received your email. I will close this issue after a resolution is achieved. I will also post the resolution here prior to closing (in addition to responding to your email of course).

from dmf.

hansmbakker avatar hansmbakker commented on May 18, 2024

In other words, where to best ask a question like:

The issue I have is that my driver works partially, but that I cannot open a connection to it to send ioctls to it - neither using a win32 CLI app nor using UWP with a CustomCapability.
The error I get is HRESULT: 0x8007001F / A device attached to the system is not functioning.
DeviceWatcher correctly finds my driver device but the error is thrown when I call CustomDevice.FromIdAsync(Id, DeviceAccessMode.ReadWrite, DeviceSharingMode.Exclusive) or CreateFile(...) in the win32 app. Other functionality in the driver works, and Windows reports no other problems regarding the driver. The errors do not provide more details.

from dmf.

samtertzakian avatar samtertzakian commented on May 18, 2024

Hi, Hans,

For now, I think asking questions here is fine. But, if you want to send a question privately, please send it to [email protected]. That alias reaches several people including me. (If this ever becomes an issue, I will let you know.)

I can tell you that we have successfully used DMF with "DeviceWatcher". The first thing I would to diagnose your issue is see if you can access the IOCTLs using a native Win32 application. If that does not work, then nothing else will work. If that does work, then we know there is another issue. One way to debug the issue since you say you can see the device from the app but not send IOCTLs is to put a break point at this function: DmfContainerEvtDeviceIoControl(). That should get called when you send an ICOTL. If that gets called, then you can step through the code until it gets to your Module or find out why it does not get there. One more thing make sure you are not using "Internal" DeviceIoControl in the Module as that will only work for driver to driver communication.

Do not hesitate to contact privately at [email protected] and one of us will help you if we can. All the feedback we receive helps us to fix issues we did not see in our own usage of DMF.

from dmf.

hansmbakker avatar hansmbakker commented on May 18, 2024

Thank you very much, Sam! I sent a mail to [email protected] containing all details, a bug reproduction branch, test apps, repro steps.

The first thing I would to diagnose your issue is see if you can access the IOCTLs using a native Win32 application
The issue is that this does not work, even though I defined my IOCTLs and registered them using the Dmf_IoctlHandler module. There is a test app in the bug reproduction branch for this.

If any details are missing, please let me know.

from dmf.

samtertzakian avatar samtertzakian commented on May 18, 2024

The issue you encountered was because you are trying to send IOCTls to a device interface generated by a filter driver. This, however, is not allowed by underlying WDM. More information is here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/using-control-device-objects
The solution is to use a Control Device (not possible in UMDF) or piggy back the communication using INPUT/OUTPUT/FEATURE reports.

from dmf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.