Microsoft KB Archive/214755

= FIX: VB 6 DLL Settings Cause Access Violation During MTS Shutdown =

Article ID: 214755

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q214755



SYMPTOMS
Using the Unattended Execution, Retain in Memory, and Single Threaded Threading Model options with a Visual Basic DLL installed in Microsoft Transaction Server (MTS) causes an access violation when the MTS package times out.

NOTE: The Access Violation can occur when a Visual Basic DLL is used with these settings in any multithreaded environment, such as MTS, IIS, Internet Explorer and so on.



RESOLUTION
Ensure that Visual Studio 6, Service Pack 3 is installed.

Settings other than those specified in the SYMPTOMS section do not cause this error. Specifically, the Apartment Threaded Threading Model option, which is recommended for use with MTS, is safe to use.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6, Service Pack 3.



MORE INFORMATION
To reproduce this problem, do the following:
 * 1) Create a Visual Basic 6 DLL with the Unattended Execution, Single Threaded, and Retain In Memory project properties set.
 * 2) Install the DLL in a Microsoft Transaction Server package.
 * 3) Run a client application that uses the DLL. This causes the package to start up.
 * 4) Close the client application.
 * 5) The access violation occurs when the package times out.

