Recital

Login Register

Using the Recital MQCURMSGS() function

MQCURMSGS()

Syntax

MQCURMSGS( <expN> )

Description

The MQCURMSGS() function returns the current number of unread messages in the queue specified by <expN>

Example

mqdes=mqopen("/myqueue")
if (mqdes < 0)
   messagebox(strerror()+",errno="+alltrim(str(error())))
   return
endif
do while (mqcurmsgs(mqdes) > 0)
   mstr=mqreceive(mqdes)
   if (empty(mstr))
      messagebox(strerror()+",errno="+alltrim(str(error())))
      return
   endif
   messagebox(mstr)
end do
mqclose(mqdes)

Twitter

Copyright © 2024 Recital Software Inc.

Login

Register

User Registration
or Cancel