TCatIoGetOutputPtr
The TCatIoGetOutputPtr function allocates an output buffer for the outgoing process image.
LRESULT TCatIoGetOutputPtr (
USHORT nPort,
VOID** ppOutp,
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".
ppOutp
Address of the pointer to get the address of the output buffer. If TCatIoGetOutputPtr succeeds, the pointer is initialized to the address of the output buffer.
nSize
Number of bytes for the requested process image buffer.
Return Values
If the function fails, the return value is non zero.
Remarks
TCatIoGetOutputPtr allocates a user buffer for the process image of the specified task and returns the address in ppOutp. If the buffer was already allocated, TCatIoGetOutputPtr returns the address of the previously allocated buffer. The output data will be transferred through this buffer. If TwinCAT is stopped or restarted while the user mode process is running the output address remains valid, although the I/O transfer is temporarily stopped. In case of a TwinCAT Restart, the user mode process can resume the execution without any extra calculation.
QuickInfo
For Windows NT:
- Windows NT Version: Requires version 4.0 or later.
- TwinCAT: Requires version 2.5 or later.
- Header: Declared in TCatIoApi.h.
- Import Library: Use TCatIoDrv.lib.
For Windows CE:
- Windows CE Version: Requires version 4.2 or later.
- Image Version: Requires version 1.90 or later.
- Header: Declared in TCatIoW32Api.h.
- Import Library: Use TCatIoDrvW32.lib.