Waits for, and then copies, arbitrary data from an RT data mailbox.
Note: If the NTX application must operate on data that contains RT Handles, you must convert the handles using ntxImportRtHandle. Also, see Handle conversion.
These functions correspond to the NTX function, ntxReceiveRtData. They receive respectively 1, 2 or 4 bytes, or a stream of bytes. The return value is the number of bytes actually received (NTX_ERROR is never returned). If the number returned is less than the number expected, the destination variable contains one or more undefined bytes. If the number of bytes received is more than the size of the destination variable, extra bytes are discarded.
Visual Basic:
Function ntxReceiveRtData1Byte( ByVal hMailbox As Integer, ByRef pMessage As Byte, ByVal dwMilliseconds As Integer) As Short Function ntxReceiveRtData2Bytes( ByVal hMailbox As Integer, ByRef pMessage As Short, ByVal dwMilliseconds As Integer) As Short Function ntxReceiveRtData4Bytes( ByVal hMailbox As Integer, ByRef pMessage As Integer, ByVal dwMilliseconds As Integer) As Short Function ntxReceiveRtDataBytes( ByVal hMailbox As Integer, ByVal pMessage () As Byte, ByVal dwMilliseconds As Integer, ByVal dMax As Integer) As Short
Visual C#:
Int16 ntxReceiveRtData1Byte ( Int32 hMailbox, ref Byte pMessage, Int32 dwMilliseconds ); Int16 ntxReceiveRtData2Bytes ( nt32 hMailbox, ref Int16 pMessage, Int32 dwMilliseconds ); Int16 ntxReceiveRtData4Bytes ( Int32 hMailbox, ref Int32 pMessage, Int32 dwMilliseconds ); Int16 ntxReceiveRtDataBytes ( Int32 hMailbox, Byte[]pMessage, Int32 dwMilliseconds, Int32 dMax );
hMailbox
pMessage
dwMilliseconds
NTX_NO_WAIT |
The thread does not wait. |
NTX_INFINITE |
The thread waits for its request to be fully satisfied. |
Any positive integer |
Calling thread goes to sleep for this many milliseconds, after which it awakes.
Note: The kernel converts milliseconds to high-level ticks. |
dMax
The number of bytes received in this operation.
E_TIME
E_EXIST
hMailbox
is not a handle for an existing object.
E_TYPE
hMailbox
is not a handle for a mailbox or the mailbox is not a data mailbox.
E_NTX_INTERNAL_ERROR
Versions | Reference |
---|---|
INtime 3.0 | INtimeDotNet |
INtimeDotNet system calls, Mailbox system calls, ntxImportRtHandle, Handle conversion, high-level ticks