#include opcapi.h
int opcif_read(
int interface_id, /* in */
opcdata data /* in/out */
);
Parameters
Description
The function opcif_read()
reads a message from the
queue of the specified interface instance. If the interface
instance has been opened with OPCIF_READ_WAIT
, the
calling process is blocked until the information is available. The
API returns an error if the application receives an interrupt
signal. The data parameter specified in the call must be created
with
opcdata_create(). Memory for the actual message data is
allocated, and if memory was assigned to data before the call to
opcif_read()
, it is deallocated.
Return Values
OPC_ERR_OK:
OPC_ERR_CANT_INIT:
OPC_ERR_INVALID_INTERFACE_ID:
OPC_ERR_INVALID_OUTPARAM:
data
is NULL or is of wrong type
OPC_ERR_WRONG_MSITYPE:
interface_id
is of wrong
type
OPC_ERR_EINTR:
OPC_ERR_MSI_BUF_FULL:
OPC_ERR_NO_DATA:
OPC_ERR_CANT_READ_MSG:
OPC_ERR_NO_MEMORY:
Versions
HPOM for Windows A.07.50 and later
See Also