/// <summary> /// Sets a new name for a device. /// </summary> /// <param name="deviceId">Id of device to change</param> /// <param name="name">The new name</param> /// <returns>Success or error code</returns> public static unsafe bool tdSetName(int deviceId, string name) { char *nameChar = stringToChar(name); bool returnValue = UnmanagedImport.tdSetName(deviceId, nameChar); Marshal.FreeHGlobal((IntPtr)nameChar); return(returnValue); }