How to Pass a Custom TRM

The following code example demonstrates passing a custom transaction request message (TRM).

' You must set the following references in your project:  
  
' Microsoft.HostIntegration.TI.ClientContext.dll  
' Microsoft.HostIntegration.TI.Globals.dll  
  
Imports Microsoft.HostIntegration.TI  
  
Dim ELMINsend As TIComponent.ELMINStructure  
Dim ELMOUTreturn As TIComponent.ELMOUTStructure  
  
Dim TIContext As New  ClientContext  
  
ELMINsend.progname = "CUSELM01"  
ELMINsend.member1 = "CE01,"  
ELMINsend.member2 = "AAAAAAAAAA"  
ELMINsend.member3 = CShort(2)  
ELMINsend.member4 = "  "  
  
ELMOUTreturn.member1 = CShort(0)  
ELMOUTreturn.member2 = ""  
  
TIContext.TransportHeaders.HeaderToBeforeDataSent = ELMINsend  
TIContext.TransportHeaders.HeaderFromAfterDataSent = ELMOUTreturn  
  
RunObj.MethodCall(parameter1, TIContext)  

See Also

ClearAllContext
CountContext
DeleteContext
QueryContextInfo
ReadContext
WriteContext
Custom TRMs and ELMs with COMTIContext