In Visual Basic, the actual operation of the TIBCO moniker is hidden. The client calls the built-in Visual Basic function GetObject
, and passes the display string to it. GetObject
creates an instance of the TIBCO moniker (class factory) and then invokes methods on it to obtain the proxy for the class specified in the programmatic identifier. The call to GetObject
returns a proxy for the default interface of the coclass. For example:
Dim Testobj1Var as Testobj1 Set Testobj1Var = GetObject("tibco:tibcr://sample|Adapter for COM/Interceptor Instances/TIBCOCOMinterceptor1|Operation2.Testobj1")
When the server-based repository needs a username and password to connect, the GetObject
call should be modified to:
Set Testobj1Var = GetObject("tibco:tibcr://sample:userName=admin:password=admin|Adap ter for COM/Interceptor Instances/TIBCOCOMinterceptor1|Operation2.Testobj1")
TIBCO Adapter™ for COM User’s Guide Software Release 5.3, September 2005 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |