Receives a message at a port. If the message contains a data portion, a pointer to the buffer used to store the data portion is returned. If a heap object was attached to the port, when the buffer is no longer required, the application should return it to the heap using the ntxReleaseRtBuffer. If there is not enough buffer space, the message is rejected by the receiving host.
Use this call to receive messages from a service. Typically, this call is used by server applications which process all messages from a given port.
You must identify the receiving port (using its handle). You must specify how long the task will wait for the message at the port. The calling task goes to sleep waiting for a message at a port. If no message arrives before the specified time limit expires, the task awakens with an E_TIME condition code.
You must also supply a pointer to a structure that this call fills with information about the message received. This structure contains information such as the type of message, certain status information, the transaction ID, the handle of the forwarding port (if the receiving port is a sink port), the originating address and port ID of the message, and the control message. The type field indicates whether the message was a simple, request, response or status message.
LPVOID ntxReceiveRtMessage( NTXHANDLE hPort, DWORD dwMilliseconds, LPRECEIVEINFO *pReceiveInfo );
hPort
dwMilliseconds
pReceiveInfo
E_OK 0x0000
E_TIME
E_EXIST 0x0006
E_STATE 0x0008
E_TYPE 0x8002
E_NUC_BAD_BUF 0x80E2
E_LOCATION
E_NTX_INTERNAL_ERROR
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/nt/include/ntx.h | ntx.h | ntx.lib |
INtime 4.01 (for 64-bit Windows) | intime/nt/include/ntx.h | ntx.h | ntx64.lib |