This is a Visual Basic Application.
VBOperationDemo
project in the examples\Demos\VBOperationDemo
directory.VBOperationDemo
project, causing the executable VBInterceptorDemo
.exe
to be generated.VBOperationDemo
.exe
. It will perform the following actions:GetObject
to obtain an ITestobj1
interface. Recall that this interface is actually an interceptor
proxy.ToUpper
on the ITestobj1
interface. This method will result in a TIBCO ActiveEnterprise operation request being sent over TIBCO Rendezvous. This operation request will be received and processed by the service component.All the code for the VBOperationDemo project is listed below:
Dim objTestobj1 As Testobj1 Private Sub Form_Unload(Cancel As Integer) Set objTestobj1 = Nothing End Sub Private Sub Form_Load() Set objTestobj1 = GetObject("tibco:c:\tibco\adapter\adcom\5.3\examples\sample.dat|Ad apter for COM/Interceptor Instances/TIBCOCOMInterceptor1|Operation2.Testobj1") End Sub Private Sub Invoke_Click() If Len(Text1.Text) Then Let Text2.Text = objTestobj1.ToUpper(Text1.Text) End If End Sub
This is a Visual Basic Application.
VBPubSubDemo
project in the examples\Demos\VBPubSubDemo
directory.VBPubSubDemo
project, causing the executable VBPubSubDemo.exe
to be generated.VBPubSubDemo.exe
. It will perform the following actions:GetObject
to obtain an ITestobj3
interface. Recall that this interface is actually an interceptor
proxy.TestPublishComplexTypeInVARIANT
three times when you click the Send button, passing a UDT
and a couple of SAFEARRAY's
through the VARIANT
parameter ip1
. This method will result in the UDT
and SAFEARRAY's
being published by the Publication Service in the Interceptor
and received by the Subscription Service in the service. The UDT
will be published as a TIBCO ActiveEnterprise MInstance
, while the SAFEARRAY's
will be published as TIBCO ActiveEnterprise MSequences
.
All the code the for the VBPubSubDemo project is listed below:
Dim objTestobj3 As Testobj3 Private Sub Send_Click() ' Publish a UDT in a VARIANT Dim varUDTSimple1 As OLEAutomationCompatibleUDTSimple Let varUDTSimple1.m_vui1 = 1 Let varUDTSimple1.m_vi2 = 2 Let varUDTSimple1.m_vi4 = 4 Let varUDTSimple1.m_vint = 4 Let varUDTSimple1.m_vboolean = True Let varUDTSimple1.m_vr4 = 4.4 Let varUDTSimple1.m_vr8 = 8.8 Let varUDTSimple1.m_vfixed = 1.1 Let varUDTSimple1.m_vdateTime = Now Let varUDTSimple1.m_vstring = "abc" Call objTestobj3.TestPublishComplexTypeInVARIANT(varUDTSimple1) 'Publish a SAFEARRAY of Floats in a VARIANT Dim varLongArray(1) As Single Let varLongArray(0) = 1.1 Let varLongArray(1) = 2.2 Call objTestobj3.TestPublishComplexTypeInVARIANT(varLongArray) 'Publish a SAFEARRAY of UDT's in a VARIANT Dim UDTSimpleArray(1) As OLEAutomationCompatibleUDTSimple Let UDTSimpleArray(0).m_vui1 = 1 Let UDTSimpleArray(0).m_vi2 = 2 Let UDTSimpleArray(0).m_vi4 = 4 Let UDTSimpleArray(0).m_vint = 4 Let UDTSimpleArray(0).m_vboolean = True Let UDTSimpleArray(0).m_vr4 = 4.4 Let UDTSimpleArray(0).m_vr8 = 8.8 Let UDTSimpleArray(0).m_vfixed = 1.1 Let UDTSimpleArray(0).m_vdateTime = Now Let UDTSimpleArray(0).m_vstring = "abc" Let UDTSimpleArray(1).m_vui1 = 1 Let UDTSimpleArray(1).m_vi2 = 2 Let UDTSimpleArray(1).m_vi4 = 4 Let UDTSimpleArray(1).m_vint = 4 Let UDTSimpleArray(1).m_vboolean = True Let UDTSimpleArray(1).m_vr4 = 4.4 Let UDTSimpleArray(1).m_vr8 = 8.8 Let UDTSimpleArray(1).m_vfixed = 1.1 Let UDTSimpleArray(1).m_vdateTime = Now Let UDTSimpleArray(1).m_vstring = "abc" Call objTestobj3.TestPublishComplexTypeInVARIANT(UDTSimpleArray) End Sub Private Sub Form_Load() Set objTestobj3 = GetObject("tibco:c:\tibco\adapter\adcom\5.3\examples\sample.dat|Ad apter for COM/Interceptor Instances/TIBCOCOMInterceptor1|Operation2.Testobj3") End Sub Private Sub Form_Unload(cancel As Integer) Set objTestobj3 = Nothing End Sub
TIBCO Adapter™ for COM User’s Guide Software Release 5.3, September 2005 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |