pavel-a / usb-relay-hid

Software for USB-connected relays with HID interface. See the WIKI for more info.
http://vusb.wikidot.com/project:driver-less-usb-relays-hid-interface
242 stars 105 forks source link

wrapper for C# .net #44

Open jaydubal opened 1 year ago

jaydubal commented 1 year ago

Hello, is there any working wraper for .net / c#? the one at https://github.com/mmcs-robotics/USB-Relay does not work.

And following code,

    [DllImport("usb_relay_device.dll", EntryPoint = "usb_relay_device_open_all_relay_channel", SetLastError = true,
    CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
    public static extern int usb_relay_device_open_all_relay_channel(int hHandle);

throws exception, 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

any help?

thanks!