Grabber::loadDeviceStateFromFile Method

Restores the device settings from a file that was previously saved by saveDeviceStateToFile.
Syntax:
bool loadDeviceStateFromFile( const std::string& filename, bool bOpenDev = true );
bool loadDeviceStateFromFile( const std::wstring& filename, bool bOpenDev = true );

Parameter Description
filename

Specifies the XML file that contains the settings data.

bOpenDev

If the parameter is set to true, the method tries to open the device that is specified by the settings data. If the parameter is false, no device will be opened, but the settings data will be applied to an already opened device.

Return value:

true, if the operation was successful, otherwise false. Call getLastError for extended error information.

Remarks:

If the parameter bOpenDev is set to true, a device specified by its name and its serial number which are stored in the settings data will be opened. If the parameter is set to false, the settings are applied to a device that is already open. The device to which the settings are applied must be of the same type as the device from which the settings data originate.

Information:

Introduced in version 2.0

See also: saveDeviceStateToFile

<< Grabber