pavel-a/usb-relay-hid

wrapper for C# .net

jaydubal opened this issue · 0 comments

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!