Example #1
0
 public bool SetProtocol(int deviceId, string protocol)
 {
     unsafe
     {
         char *ptr    = protocol.ToCharPointer();
         bool  result = (!_isWin) ? LinuxInterop.tdSetProtocol(deviceId, ptr) : WinInterop.tdSetProtocol(deviceId, ptr);
         Marshal.FreeHGlobal((IntPtr)ptr);
         Thread.Sleep(0);
         return(result);
     }
 }