Microsoft KB Archive/201907

= PRB: DLL May Not Get DLL_PROCESS_DETACH Call When in an MTS Process =

Article ID: 201907

Article Last Modified on 6/12/2001

-

APPLIES TO


 * Microsoft Transaction Services 2.0

-



This article was previously published under Q201907



SYMPTOMS
If a DLL, whose Microsoft ActiveX components are installed in Microsoft Transaction Server (MTS) version 2.0, is hosted in an MTS process, the DllMain function might not receive a DLL_PROCESS_DETACH call when the MTS process is shut down. Therefore, you cannot rely on receiving a DLL_PROCESS_DETACH call in order to perform DLL clean-up activities.



CAUSE
If the MTS process is shut down manually by using the MTS Explorer or the Mtxstop program, the process (after a very brief delay) calls the Win32 API TerminateProcess function. In this case, a DLL_PROCESS_DETACH call to DllMain does not occur.

NOTE: The DLL_PROCESS_DETACH call does occur when the MTS process shuts down because the package times out. Note that this scenario does not apply to MTS packages that have an infinite time-out, such as out-of-process Microsoft Internet Information Server (IIS) virtual directories.



STATUS
This behavior is by design.

Additional query words: kbDSupport

Keywords: kbprb KB201907

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.