Method ITComOnlineChange:PerformOnlineChange

This method is called by TwinCAT to perform the Online Change.

It is called blocking. It should therefore only take a short time.

Syntax


virtual HRESULT TCOMAPI PerformOnlineChange(ITComObject* ipOldObj, TmcInstData* pOldInfo) = 0;

Method ITComOnlineChange:PerformOnlineChange 1: Return value

If successful, S_OK ("0") or another positive value will be returned, cf. Return values. Extended messages refer in particular to the column HRESULT in ADS Return Codes.

Parameter

Name

Type

Description

ipOldObj

ITComObject*

Reference to the existing object to be exchanged.

pOldInfo

TmcInstData*

Reference to information of the existing object.

Via ipOldObj, the data of the existing object is made available for transfer so that it can be applied.

For example:

ULONG nData = sizeof(m_Parameter);
PVOID pData = &m_Parameter;
ipOldObj->TcGetObjPara(PID_Module1Parameter, nData, pData);