1.3.4 Programming with Visual Basic (VB)
One benefit of the .NET Framework environment is language integration. Once a .NET assembly is generated, you can use any .NET supported language to develop applications using that assembly. Accordingly, you can also use J#, VB, C++ or other .NET supported languages to develop Tuxedo .NET Workstation Client applications.
The following code snippet illustrates a Visual Basic .NET Code Example language code example:
Imports System
Imports Bea.Tuxedo.ATMI
Module Main
Sub Main()
Dim sndstr, rcvstr As TypedString
Dim ac As AppContext
Dim info As TypedTPINIT
info = New TypedTPINIT()
info.cltname = "vb client"
Try
ac = AppContext.tpinit(info)
sndstr = New TypedString("hello world")
rcvstr = new TypedString(1000)
ac.tpcall("TOUPPER", sndstr, rcvstr, 0)
Console.WriteLine("rcvstr = {0}"
...rcvstr.GetString(0,1000))
ac.tpterm()
Catch e as ApplicationException
Console.WriteLine("Got Exception = {0}", e)
End Try
End Sub
End Module
Parent topic: Programming Tuxedo .NET Workstation Clients