This article has been archived. It is offered "as is" and will no longer be updated.
In Microsoft Host Integration Server 2000, when you use the new Microsoft Component Object Model (COM) Transaction Integrator (COMTI) Context Array, a memory leak may occur in the Dllhost.exe process.
This problem occurs if multiple WriteContext function calls are made to the same COMTIContext keyword entry for a Context Array variable.
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
The English version of this hotfix has the file attributes (or later file attributes) 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.
Note Because of file dependencies, the most recent fix that contains these files may also contain additional files.
To work around this problem, use the ClearAllContext method or the DeleteContext method to delete the entry from the Context Array. Then, use the WriteContext function to write new entries.
The following Microsoft Visual Basic .NET code example demonstrates how to create the variables and how to use the DeleteContext and ClearAllContext methods.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
'Create an instance of the COMTI component. Dim objCOMTI As New Context.Test 'Create an instance of the new Context feature. Dim objCntx As New COMTICONTEXTLib.ContextObject 'Create an array to write the Context data to. Dim ContextArray() As Object 'Create the variables for the data parameters for the method call. Dim sInfo As String = "Info for host" Dim dBalance As Decimal = 0.0 'Write the context values to the context array. objCntx.WriteContext("REOverride", "AltREName", ContextArray) objCntx.WriteContext("USERID", "UUUUUUUU", ContextArray) objCntx.WriteContext("PASSWORD", "PPPPPPPP", ContextArray) 'Make the COMTI method call or calls. objCOMTI.MakeCall(sInfo, dBalance, ContextArray) 'Assume that another call is required to a different Remote Environment (RE) 'by using the same security credentials. 'To work around the memory leak by using DeleteContext, use this code: objCntx.DeleteContext("REOverride", ContextArray) 'This line only deletes the REOverride entry. 'Enter the new entry for the RE. objCntx.WriteContext("REOverride", "NewREName", ContextArray) 'Make the COMTI method call to the new RE. objCOMTI.MakeCall(sInfo, dBalance, ContextArray) 'Assume that another call is required to different RE and different Security. 'To work around the memory leak by using ClearAllContext, use this code: objCntx.ClearAllContext(ContextArray) 'This code clears the complete context array. 'Make the new entries. objCntx.WriteContext("REOverride", "OtherREName", ContextArray) objCntx.WriteContext("USERID", "MYUSERID", ContextArray) objCntx.WriteContext("PASSWORD", "MYPASSWD", ContextArray) 'Make the COMTI method call by using the new RE and Security information. objCOMTI.MakeCall(sInfo, dBalance, ContextArray)
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.
This hotfix examines the Context Array. Then, the hotfix deletes duplicate entries before it writes new entries.
For additional information about using the Context Array, click the following article numbers to view the articles in the Microsoft Knowledge Base:
839038 FIX: New features are available for security credentials and host access in the COM Transaction Integrator for Host Integration Server 2000
810956 FIX: A new feature in the COM Transaction Integrator gives the client program full control over a TRM request and lets the client program process the TRM reply