E_INVALIDARG

Invalid Argument Provided

Beckhoff · TwinCAT 2 Automation Interface

What does E_INVALIDARG mean?

An invalid argument was supplied to the function. For OpenConfiguration(), the bstrFile path does not refer to a valid TwinCAT configuration file. For SaveConfiguration(), the bstrFile path is invalid for saving. For LinkVariables(), the offs1, offs2, or size parameters do not match the variables' structure or range.

Additional Steps

Steps 1–2 are listed in Priority Fix.

  1. 3

    Check for any illegal characters, incorrect syntax, or inaccessible locations in file paths or parameter values.

Source: Beckhoff TwinCAT 2 Automation Interface
Open Manual (Page 32)