I'm developing a supervisory system with C# and it connects to some instruments through a RS485 controller. This controller was made with a microship processor and Windows OS recognize it as a HID Device (USB plug and play). That said, I developed using the Windows dll functions (hid.dll), as ilustrated in the code block below:
[DllImport("hid.dll", SetLastError = true)]
public static extern void HidD_GetHidGuid(ref Guid hidGuid);
[DllImport("hid.dll", SetLastError = true)]
public static extern bool HidD_GetNumInputBuffers(SafeFileHandle hidDeviceObject, ref Int32 numberBuffers);
[DllImport("hid.dll", SetLastError = true)]
public static extern bool HidD_GetPreparsedData(SafeFileHandle hidDeviceObject, ref IntPtr preparsedData);
Today, I'm studing a port of this application to a Linux OS (Debian distro) with Mono and I believe Linux won't work with these calls due its Windows OS based.
Is there any other way to integrate HID devices with C# without using these dlls? Or even do you have any clue how to achieve this?