Ejemplo n.º 1
0
 public bool SetName(int deviceId, string name)
 {
     unsafe
     {
         char *ptr    = name.ToCharPointer();
         bool  result = (!_isWin) ? LinuxInterop.tdSetName(deviceId, ptr) : WinInterop.tdSetName(deviceId, ptr);
         Marshal.FreeHGlobal((IntPtr)ptr);
         Thread.Sleep(0);
         return(result);
     }
 }