Method ITComOnlineChange:PerformOnlineChange

This method is called to perform the Online Change.

The method is called by TwinCAT to execute the OnlineChange. It is called blocking. It should therefore only take a short time.

Syntax

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

Parameter

ipOldObj: (Type: ITComObject*) Reference to the existing object to be exchanged.

pOldInfo: (type: TmcInstData*) reference to information of the existing object.

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.

Description

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);