ctThrdQueueWriteDirect
Write a queue message pointer.
Short Name
ctThrdQueueWriteDirect()
Type
Threading function
Declaration
NINT ctDECL ctThrdQueueWriteDirect(NINT qid, pVOID message, NINT msglen)
Description
ctThrdQueueWriteDirect() adds the address for queue entry message of length msglen to the queue qid. Unlike ctThrdQueueWrite(), which copies the contents of the entry into a buffer allocated by the queue write call, ctThrdQueueWriteDirect(). Uses pointers to buffers created by the application to manage messages.
Note: The application is responsible for managing the buffers used in the ctThrdQueueReadDirect() and ctThrdQueueWriteDirect() calls. To avoid memory/buffer errors, FairCom recommends using either the original Queue read/write calls or the new direct calls, but not mixing calls from both pairs.
The return value is an error indicator.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
Successful queue write. |
90 |
NQUE_ERR |
Invalid qid. |
92 |
QMRT_ERR |
Queue memory error. |
514 |
CQUE_ERR |
Queue could not be closed. |
See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.
See also
ctThrdQueueWrite, ctThrdQueueReadDirect, ctThrdLIFOWrite