Example #1
0
        /// <summary>
        /// This function is used to read the value of MHL feature functions of BOOL type.
        /// </summary>
        /// <param name="name">Name of the requested feature</param>
        /// <exception cref="System.ArgumentException">If exceptions are enabled, on failure exception is thrown with valid error message.</exception>
        /// <returns>BOOL value for requested feature. Returns false on failure, use GetLastError() to verify errors if exceptions are not enabled.</returns>
        /// <remarks>On failure, use GetLastError() ot GetLastErrorMessage() for more information.</remarks>
        public bool GetBool(string name)
        {
            bool ret = MHLSRV._MHL_GetBool(loadedDrvHandle, name) == 1;

            if (throwsException && this.GetLastError() != 0)
            {
                throw new System.ArgumentException("Get BOOL Failed " + name, "Error " + this.GetLastError().ToString() + "; " + this.GetLastErrorMessage());
            }
            return(ret);
        }
Example #2
0
 /// <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 bool GetBool(int handle, String name)
 {
     return((MHLSRV._MHL_GetBool(handle, name) == 1) ? true : false);
 }