ITcSysManager::OpenConfiguration

The OpenConfiguration() methid loads a previously created TwinCAT configuration file.

HRESULT OpenConfiguration(BSTRbstrFile);

Parameters

bstrFile

[in, defaultvalue(L"")] contains the file path of the configuration file that should be loaded or an empty string if a new configuration should generate. The currently running configuration of a target device may also be read by using "CURRENTCONFIG".

Return Values

S_OK

function returns successfully.

E_ACCESSDENIED

the current document in the system manager instance is locked. This occurs if at least one reference to the system managers object or one of the tree elements are open.

E_INVALIDARG

the given file path does not refers to a valid configuration file.

Comments

Note

The three methods ITcSysManager::NewConfiguration, ITcSysManager::OpenConfiguration and ITcsSysManager::SaveConfiguration are only available in Compatiblity Mode. Calling them in standard mode will throw an E_NOTSUPPORTED Exception.