Difference between revisions of "MQCLOSE()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to close an open message queue | Function to close an open message queue | ||
− | |||
==Syntax== | ==Syntax== | ||
MQCLOSE(<expN>) | MQCLOSE(<expN>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQRECEIVE()]], [[MQSEND()]], [[MQUNLINK()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] | + | [[JSON_DECODE()]], [[JSON_DECODE_FILE()]], [[JSON_ENCODE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]], [[MQRECEIVE()]], [[MQSEND()]], [[MQSENDMESSAGE()]], [[MQUNLINK()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]] |
− | + | ||
==Description== | ==Description== | ||
The MQCLOSE() function is used to close an open message queue. The <expN> is the pointer to a queue opened with MQCREATE() or MQOPEN(). It returns .T. (true) if the queue is closed successfully. If an error occurs and it is unable to close the queue, it returns .F. (false) and the ERRNO() function can be checked to determine the error. | The MQCLOSE() function is used to close an open message queue. The <expN> is the pointer to a queue opened with MQCREATE() or MQOPEN(). It returns .T. (true) if the queue is closed successfully. If an error occurs and it is unable to close the queue, it returns .F. (false) and the ERRNO() function can be checked to determine the error. | ||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
Line 34: | Line 28: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:Messaging Functions]] | [[Category:Messaging Functions]] | ||
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 04:04, 30 March 2017
Contents
Purpose
Function to close an open message queue
Syntax
MQCLOSE(<expN>)
See Also
JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQRECEIVE(), MQSEND(), MQSENDMESSAGE(), MQUNLINK(), XML_DECODE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER()
Description
The MQCLOSE() function is used to close an open message queue. The <expN> is the pointer to a queue opened with MQCREATE() or MQOPEN(). It returns .T. (true) if the queue is closed successfully. If an error occurs and it is unable to close the queue, it returns .F. (false) and the ERRNO() function can be checked to determine the error.
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)