Beckhoff · TwinCAT 2 Automation Interface
An invalid pointer was provided to the function. For ProduceXml(), this applies to the output pXML parameter, indicating the variable to store the XML string is not properly allocated. For CreateChild(), this means the pipItem pointer, intended to receive the new child item's interface, is invalid, preventing the successful creation and return of the child item.
Click steps to track your progress.
Ensure the output pXML or pipItem parameter is a valid, allocated pointer capable of receiving the expected output (BSTR or ITcSmTreeItem interface).
Check for memory allocation issues in the calling code or improper variable declaration for the output parameter.
Verify the calling environment's COM object handling and pointer management conventions.