TCatIoGetInputPtr

The TCatIoGetInputPtr function allocates an input buffer for the incoming process image.

LRESULT TCatIoGetInputPtr ( 
  USHORT nPort, 
  VOID** ppInp, 
  int nSize
);

Parameters

nPort

Port id of the I/O task whose process image should be used to transfer the output data. For further information on defining the task process image see the TwinCAT System Manager documentation, chapter "Additional tasks".

ppInp

Address of the pointer to get the address of the output buffer. If TCatIoGetInputPtr succeeds, the pointer is initialized to the address of the input buffer.

nSize

Number of bytes for the requested process image buffer.

Return Values

If the function fails, the return value is non zero.

Remarks

TCatIoGetInputPtr allocates a user buffer for the process image of the specified task and returns the address in ppInp. If the buffer was already allocated, TCatIoGetInputPtr returns the address of the previously allocated buffer. The input data will be transferred through this buffer. If TwinCAT is stopped or restarted while the user mode process is running the input address remains valid, although the I/O transfer is temporary stopped. In case of a TwinCAT Restart, the user mode process can resume the execution without any extra calculation.

QuickInfo

For Windows NT:    

For Windows CE:

See Also

TCatIoGetOutputPtr ()