Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Reading data from USB device using winusb.dll

Discussion in 'Scripting' started by V0odo0, Nov 10, 2021.

  1. V0odo0


    Jan 8, 2012
    I'm using Windows winusb.dll NET wrapper library to interact with USB devices. I can not get it working on Unity while the exact same code compiled with VS is working properly.

    Here is what I noticed with winusb.dll native calls.

    Visual Studio:
    WinUsb_GetDescriptor() - OK
    WinUsb_ReadPipe() - OK

    WinUsb_GetDescriptor() - OK
    WinUsb_ReadPipe() - returns false but fills the read buffer with random amount of bytes on each call

    I assume that this issue somehow related to Unity.