コード例 #1
0
        /// <summary>
        ///  Sets a new model for a device. Which model to set depends on the current protocol.
        /// </summary>
        /// <param name="deviceId">Id of device to change</param>
        /// <param name="model">The new model</param>
        /// <returns>Success or error code</returns>
        public static unsafe bool tdSetModel(int deviceId, string model)
        {
            char *modelChar   = stringToChar(model);
            bool  returnValue = UnmanagedImport.tdSetModel(deviceId, modelChar);

            Marshal.FreeHGlobal((IntPtr)modelChar);
            return(returnValue);
        }