Difference between revisions of "MQUNLINK()"

From Lianjapedia
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to remove a message queue
 
Function to remove a message queue
 
  
 
==Syntax==
 
==Syntax==
 
MQUNLINK(<expC>)
 
MQUNLINK(<expC>)
 
  
 
==See Also==
 
==See Also==
[[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]],  [[MQRECEIVE()]], [[MQSEND()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]]
+
[[JSON_DECODE()]], [[JSON_DECODE_FILE()]], [[JSON_ENCODE()]], [[MQCLOSE()]], [[MQCREATE()]], [[MQCURMSGS()]], [[MQOPEN()]],  [[MQRECEIVE()]], [[MQSEND()]], [[MQSENDMESSAGE()]], [[XML_DECODE()]], [[XML_ENCODE()]], [[XML_GATHER()]], [[XML_SCATTER()]]
 
+
  
 
==Description==
 
==Description==
 
The MQUNLINK() function is used to remove a message queue.  The <expC> is the name of the queue.  It returns .T. (true) if the queue is removed successfully.  If an error occurs and it is unable to remove the queue, it returns .F. (false) and the ERRNO() function can be checked to determine the error.
 
The MQUNLINK() function is used to remove a message queue.  The <expC> is the name of the queue.  It returns .T. (true) if the queue is removed successfully.  If an error occurs and it is unable to remove the queue, it returns .F. (false) and the ERRNO() function can be checked to determine the error.
 
For more examples of handling message queues, please see the examples/mqueue programs in the software distribution.
 
 
  
 
==Example==
 
==Example==
Line 41: Line 35:
 
</code>
 
</code>
  
 
==Products==
 
Lianja, Lianja Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Messaging]]
 
 
[[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:06, 30 March 2017

Purpose

Function to remove a message queue

Syntax

MQUNLINK(<expC>)

See Also

JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), MQCLOSE(), MQCREATE(), MQCURMSGS(), MQOPEN(), MQRECEIVE(), MQSEND(), MQSENDMESSAGE(), XML_DECODE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER()

Description

The MQUNLINK() function is used to remove a message queue. The <expC> is the name of the queue. It returns .T. (true) if the queue is removed successfully. If an error occurs and it is unable to remove 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
// close the queue
mqclose(mqdes)
// remove the queue
rc = mqremove("/myqueue2")
if (rc < 0)
    messagebox(strerror()+",errno="+alltrim(str(error())))
    return
endif