FairCom Corporation


F.75 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 ctThrdQueueRead- Direct 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 Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.

SEE ALSO

ctThrdQueueWrite and ctThrdQueueReadDirect.


FairCom Corporation
www.faircom.com