IC Imaging Control C++

Grabber::loadDeviceStateFromFile Method

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

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us