Пример #1
0
 public bool SetDeviceParameter(int deviceId, string name, string value)
 {
     unsafe
     {
         char *ptr    = name.ToCharPointer();
         char *value2 = value.ToCharPointer();
         bool  result = (!_isWin)
             ? LinuxInterop.tdSetDeviceParameter(deviceId, ptr, value2)
             : WinInterop.tdSetDeviceParameter(deviceId, ptr, value2);
         Marshal.FreeHGlobal((IntPtr)ptr);
         Marshal.FreeHGlobal((IntPtr)value2);
         Thread.Sleep(0); //??
         return(result);
     }
 }