EndPeek throwing MessageQueueException with MessageQueueErrorCode set to -1073741536

C

Craig

Hi,
Would appreciate any help you guys have to offer. On calling beginPeek on
instantiation of a MessageQueue, EndPeek throws a MessageQueueException. If
the queue exists already, the exception is not thrown, but when I just
create the queue and call BeginPeek, the exception is thrown on calling
EndPeek. The MessageQueueErrorCode of the exception has the
value -1073741536. I've tried matching this up with a defined
MessageQueueErrorCode, but there's no match. Also, the message string of the
exception is blank. Any ideas?

//begin code
if(!MessageQueue.Exists(_messageQueuePath)) {
MessageQueue tempMQ = MessageQueue.Create(_messageQueuePath, true);
tempMQ.SetPermissions(_windowsSecurityAccount,
MessageQueueAccessRights.FullControl);
}
_myQueue = new MessageQueue(_messageQueuePath);
_myQueue.Formatter = new BinaryMessageFormatter();
_myQueue.PeekCompleted += new
PeekCompletedEventHandler(m_myQueue_PeekCompleted);
_myQueue.BeginPeek();
//end code

Thank you.
Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top