Message Queuing Application May Fail in Mqoa.dll with an Access Violation

Article translations Article translations
Article ID: 830475 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


A Microsoft Message Queuing (also known as MSMQ) component that uses the EnableNotification method call and is written in Microsoft Visual Basic may result in an access violation.


This access violation occurs because of a race condition between threads in the Mqoa.dll file. When this problem occurs, the running program thread calls the MSMQQueue.EnableNotification method. The message is peeked immediately and is dispatched to the MSMQEvent event handler. Because the MSMQEvent event handler is in a multithreaded apartment (MTA), the call is dispatched to a worker thread. This worker thread will execute the event handler code and may take some time to complete.

The race condition starts when the program thread exits and runs its destructor. Because the MSMQEvent event handler is an apartment thread, the release event is dispatched to the MSMQEvent event handler, and the MSMQEvent object is released from memory. In the meantime, the event handler worker thread still tries to finish processing the event message. When the worker thread tries to reference the MSMQEvent object, an access violation occurs because the MSMQEvent object has been released from memory. For additional information about race conditions, click the following article number to view the article in the Microsoft Knowledge Base:
317723 INFO: What Are Race Conditions and Deadlocks?
For additional information about multithreaded apartments (MTA), click the following article number to view the article in the Microsoft Knowledge Base:
150777 INFO: Descriptions and Workings of OLE Threading Models


Hotfix Information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.


No prerequisites are required.

Restart Requirement

You must restart your computer after you apply this hotfix.

Hotfix Replacement Information

This hotfix does not replace any other hotfixes.

File Information

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version            Size    File name
   21-Oct-2003  14:03         281,360  Mq1repl.dll      
   20-Sep-2003  17:23          14,096  Mq1sync.exe      
   02-Oct-2003  19:21          76,016  Mqac.sys
   21-Oct-2003  14:03         217,360  Mqads.dll        
   20-Sep-2003  17:23          25,360  Mqbkup.exe       
   21-Oct-2003  14:03          76,560  Mqdscli.dll      
   21-Oct-2003  14:03          42,256  Mqdssrv.dll      
   20-Sep-2003  17:23          98,064  Mqmig.exe        
   21-Oct-2003  14:03         265,488  Mqmigrat.dll     
   21-Oct-2003  14:03         222,480  Mqoa.dll         
   21-Oct-2003  14:03          10,000  Mqperf.dll       
   21-Oct-2003  14:03         433,936  Mqqm.dll         
   21-Oct-2003  14:03         102,672  Mqrt.dll         
   21-Oct-2003  14:03          70,928  Mqsec.dll        
   21-Oct-2003  14:03         400,656  Mqsnap.dll       
   21-Oct-2003  14:03          23,824  Mqupgrd.dll      
   21-Oct-2003  14:03         110,864  Mqutil.dll       
   21-Oct-2003  14:03          64,784  Msmq.cpl
   09-Oct-2003  00:18             6,656  Spmsg.dll        
   09-Oct-2003  00:19           140,800  Spuninst.exe     
   09-Oct-2003  00:19            22,016  Spcustom.dll     


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.


Article ID: 830475 - Last Review: October 26, 2013 - Revision: 2.6
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Advanced Server
kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbbug kbfix kbqfe kbwin2000presp5fix KB830475

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from