C# 调用继电器api usb_relay_device.dll 代码封装 usb_relay_device.dll 为C++编写 using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; namespace USBRelayTest { public class UsbRelayDeviceHelper {
网上找不到调用此类库的文章,简单写一下,以备后用. 下面是封装后的调用c++类库的类 public class UsbRelayDeviceHelper { /// <summary> /// Init the USB Relay Libary /// </summary> /// <returns>This function returns 0 on success and -1 on error.</returns> [DllImport("u