/// <summary> /// This function is used to write a boolean value to MHL features that are of boolean type. /// </summary> /// <param name="name">Name of the feature to set</param> /// <param name="val">bool value to set</param> /// <exception cref="System.ArgumentException">If exceptions are enabled, on failure exception is thrown with valid error message.</exception> /// <returns>true on success, false on failure.</returns> /// <remarks>On failure, use GetLastError() ot GetLastErrorMessage() for more information.</remarks> public bool SetBool(string name, bool val) { if (MHLSRV._MHL_SetBool(loadedDrvHandle, name, val ? 1 : 0) == 0) { if (throwsException) { throw new System.ArgumentException("Cannot set BOOL " + name, "Error " + this.GetLastError().ToString() + "; " + this.GetLastErrorMessage()); } return(false); } return(true); }
/// <summary>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class.</summary> /// <remarks>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new MHLDriver class.</remarks> public int SetBool(int handle, String name, bool val) { return(MHLSRV._MHL_SetBool(handle, name, (val == true) ? 1 : 0)); }