/// <summary> /// This function is used to load a previously stored configuration of the loaded MHL driver. /// The idea behind this is that you can store the existing setting when your application starts and then radically alter the settings of the MHL driver to suit your needs. /// This may include capturing the Scan button so that it sends a virtual key code your program can intercept instead of automatically triggering the scanner. /// Another typical use is to set up the barcode scanners parameters as you need them to be. /// Then when your program exits you can load the initial profile and ensure that the device works as a factory default unit when your application is no longer running. /// You can also use this function to restore factory default settings unless you have previously overwritten the SystemDefault profile. /// </summary> /// <param name="name">The name of the profile you wish to load. The name must have been used earlier with SaveProfile to store a profile or it must be the SystemDefault profile.</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 LoadProfile(string name) { if (MHLSRV._MHL_LoadProfile(loadedDrvHandle, name) == 0) { if (throwsException) { throw new System.ArgumentException("Cannot load profile " + 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 LoadProfile(int handle, String name) { return(MHLSRV._MHL_LoadProfile(handle, name)); }