コード例 #1
0
 /// <summary>
 /// This function is used for MHL feature functions that are of the Executable type.
 /// They typically trigger some kind of process or function in hardware.
 /// Internally this call is the same as calling the same function with SetBool with a true parameter.
 /// </summary>
 /// <param name="name">Name of the feature 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 Execute(string name)
 {
     if (MHLSRV._MHL_Execute(loadedDrvHandle, name) == 0)
     {
         if (throwsException)
         {
             throw new System.ArgumentException("Cannot EXECUTE " + name, "Error " + this.GetLastError().ToString() + "; " + this.GetLastErrorMessage());
         }
         return(false);
     }
     return(true);
 }
コード例 #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 int Execute(int handle, String name)
 {
     return(MHLSRV._MHL_Execute(handle, name));
 }