INFO: TAPI DLL Is Not Unloaded After 16-Bit TAPI Crashes (185565)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP

This article was previously published under Q185565

SUMMARY

The TAPI.dll in a 16-bit TAPI application is a thunking layer to the TAPI32.dll. If a 16-bit TAPI application running in a shared virtual DOS machine (VDM) crashes, the TAPI32.dll is not unloaded until the VDM is unloaded. This may cause some unexpected behavior when another TAPI application is run in the same VDM after the crash.

MORE INFORMATION

16-bit processes run as threads within the WOW (Windows-on-Windows) VDM process context. WOW keeps track of each 16-bit DLL loaded by 16-bit applications. If an application crashes, WOW decrements the usage count and unloads the DLL if necessary.

When a 16-bit application loads a 32-bit DLL through a thunk, the DLL is loaded into the WOW VDM. WOW has no knowledge of it. If the application crashes, the 16-bit thunk DLL that initiated the thunk is unloaded by WOW. However, the 32-bit DLL is "orphaned" because it remains loaded in the VDM process.

The 16-bit TAPI.dll is a thunk DLL to the 32-bit TAPI32.dll. When a 16-bit TAPI application crashes, it leaves the TAPI32.dll orphaned. Therefore, if another 16-bit TAPI application tries to run in the same VDM, unexpected behavior can occur.

This information only applies to 16-bit applications that are running under a shared VDM. If they are running on separate VDMs, the VDM is automatically flushed from memory when the running application crashes.

Modification Type:MajorLast Reviewed:3/15/2004
Keywords:kbAPI kbinfo kbKernBase kbTAPI KB185565