The information in this article applies to:
SYMPTOMS
The IsOpen property of a Microsoft Message Queue (MSMQ) MSMQQueue object returns an Integer result rather than a Boolean. IsOpen property returns a 1 if the queue is open and a 0 if it is not. This can cause logic errors in a Visual Basic (VB) program if the property is used in the expression portion of an If, While, or similar conditional statement.
RESOLUTIONThere are two possible workarounds for the problem:
STATUSIt is safe to test explicitly for the 1 and 0 values. These values will not be changed in any future version of MSMQ and will remain consistent. Future versions of the MSMQ ActiveX components may add a property that may be evaluated as a true Boolean type for testing this characteristic. MORE INFORMATIONThe MSDN Online help describes the return values for the IsOpen property as follows:
REFERENCES
MSDN Online help for the MSMQQueue object type. Q246218 MSMQMessage Object IsAuthenticated Property Returns an Integer Q246222 MSMQQueueInfo Object IsTransactional Property Returns An Integer Q246225 MSMQQueueInfo Object IsWorldReadable Property Returns and Integer Q246458 MSMQMessage Object IsFirstInTransaction Property Returns An Integer Q246460 MSMQMessage Object IsLastInTransaction Property Returns An Integer Additional query words: MSMQ MSMQQueue IsOpen
Keywords : kbMSMQ kbMSMQ100 kbMSMQ100bug kbDSupport |
Last Reviewed: November 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |