Difference between revisions of "MQSEND()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Send a message to an open message queue | Send a message to an open message queue | ||
− | |||
==Syntax== | ==Syntax== | ||
MQSEND(<expN>, <expC>) | MQSEND(<expN>, <expC>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQRECEIVE()]], [[MQUNLINK()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] | + | [[JSON_DECODE()]], [[JSON_DECODE_FILE()]], [[JSON_ENCODE()]], [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQRECEIVE()]], [[MQSENDMESSAGE()]], [[MQUNLINK()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] |
− | + | ||
==Description== | ==Description== | ||
Line 15: | Line 12: | ||
The MQCLOSE() function is used to close a queue which has been opened with MQCREATE() or MQOPEN(). | The MQCLOSE() function is used to close a queue which has been opened with MQCREATE() or MQOPEN(). | ||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
Line 36: | Line 30: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:Messaging Functions]] | [[Category:Messaging Functions]] | ||
[[Category:Lianja VFP Extensions]] | [[Category:Lianja VFP Extensions]] | ||
[[Category:VFP Function Extensions]] | [[Category:VFP Function Extensions]] |
Latest revision as of 04:05, 30 March 2017
Contents
Purpose
Send a message to an open message queue
Syntax
MQSEND(<expN>, <expC>)
See Also
JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), MQCLOSE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQRECEIVE(), MQSENDMESSAGE(), MQUNLINK(), XML_DECODE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER()
Description
The MQSEND() function sends a message to an open message queue. The <expN> is the pointer to a queue opened with MQCREATE() or MQOPEN(). The <expC> is the character string message to send. It returns 0 (zero) if the message is sent successfully. If an error occurs and it is unable to send the message, it returns -1 and the ERRNO() function can be checked to determine the error.
The MQCLOSE() function is used to close a queue which has been opened with MQCREATE() or MQOPEN().
Example
// Open up the queue for read/write access mqdes=mqcreate("/myqueue2", 2) if (mqdes < 0) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif // send a message to the queue rc = mqsend(mqdes, "Test message") if (rc < 0) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif mqclose(mqdes)