Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: The COM Transaction Integrator leaks memory when it handles NULL output strings


View products that this article applies to.

Symptoms

Automation clients that are written in Microsoft .NET Framework languages that issue method calls to the Microsoft COM Transaction Integrator (COMTI) component may experience errors if the Dllhost.exe surrogate process (Microsoft COM+ package) that houses the COMTI component has been running for a long time without restarting. The client may receive one of the following error messages:

The object does not support automation or does not support the expected interface.

Out of memory (HR=8007000e)

The class does not support automation or does not support the expected interface.
Also, when you use Windows Performance Monitor or Windows Task Manager to view the COMTI process, you may notice a steady increase in memory usage when COMTI calls are processed by the system. Virtual memory usage also increases at 2 or 3 times the rate of private bytes usage.

For example, this problem may occur when the automation clients are written in the following languages:
  • Microsoft Visual C# .NET
  • Microsoft Visual Basic .NET

↑ Back to the top


Cause

This problem occurs because the COMTI runtime incorrectly allocates an empty BSTR string when a client passes a NULL initialized Microsoft .NET String data type to an output-only COMTI method parameter.

A memory leak occurs even though the .NET String data type has been correctly initialized to NULL.

Note If an output-only string parameter is initialized with data before the COMTI method is called, a memory leak will occur in the COMTI Dllhost.exe process. See the "More Information" section for examples of how to code output-only string parameters correctly.

↑ Back to the top


Resolution

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
328152� How to obtain the latest service pack for Host Integration Server 2000

Hotfix 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
   ------------------------------------------------------------
   04-May-2004  23:54  5.0.0.980   37,136  Capture.dll
   04-May-2004  23:54  5.0.0.980  323,856  Cedrmsgs.dll
   04-May-2004  23:54  5.0.0.980   33,040  Comticontext.dll
   04-May-2004  23:54  5.0.0.980   28,944  Comtiperf.dll
   04-May-2004  23:54  5.0.0.980  147,728  Convert.dll
   04-May-2004  23:54  5.0.0.980   74,000  Convertprim.dll
   04-May-2004  23:54  5.0.0.980   33,040  Dpl1.dll
   04-May-2004  23:54  5.0.0.980  823,568  Dtcob390.dll
   04-May-2004  23:54  5.0.0.980  311,568  Mobase.dll
   04-May-2004  23:54  5.0.0.980   37,136  Playback.dll
   04-May-2004  23:54  5.0.0.980   78,096  Readlib.dll
   04-May-2004  23:54  5.0.0.980  123,152  Tadtlb.dll
   04-May-2004  23:54  5.0.0.980  119,056  Tagen.dll
   04-May-2004  23:54  5.0.0.980   82,192  Tranlu62.dll
   04-May-2004  23:54  5.0.0.980  114,960  Trantcp.dll
   04-May-2004  23:54  5.0.0.980   49,424  Turnaround.dll
   04-May-2004  23:54  5.0.0.870  950,272  Componentbuilder.exe
   29-Mar-2003  01:15             838,423  Comticb.chm
   29-Mar-2003  01:15             812,988  Resnapin.chm

				
Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.

↑ Back to the top


Status

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

This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.

↑ Back to the top


More information

Applications that call COMTI methods that have output-only string parameters defined must have the parameter initialized to NULL before the COMTI call occurs. The following example shows how to set the parameter to NULL before the COMTI call occurs:

Visual C# .NET

NameOut = null;

// The second parameter is defined as OUTPUT by using the COMTI Component Builder.

objCOMTI.COMTIMethod (NameIn, out NameOut );
If any output string is preinitialized with data, a memory leak occurs in the COMTI process space if the string is passed into an output-only parameter method. For example, the following output strings cause a memory leak:
  • NameOut = "";
  • NameOut = " ";
  • NameOut = "Microsoft";

↑ Back to the top


Keywords: KB841386, kbhotfixserver, kbqfe, kbhostintegserv2000sp2fix, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 841386
Revision : 4
Created on : 6/5/2006
Published on : 6/5/2006
Exists online : False
Views : 375