如何傳遞自訂 TRM
下列程式碼範例示範 (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)
另請參閱
ClearAllContext
CountContext
DeleteContext
QueryContextInfo
ReadContext
WriteContext
使用 COMTIContext 提供自訂 TRM 和 ELM