1.3.3.3 Using VIEW/VIEW32 Typed Buffers
The Tuxedo .NET Workstation Client uses class
TypedVIEW
to create and access VIEW/VIEW32 data. You
should do the following steps to develop Tuxedo .NET Workstation
Client applications using VIEW/VIEW32 typed buffers:
- Define the VIEW definition file (.v).
- Use the Tuxedo .NET Workstation Client
viewcs
utility to compile the VIEW definition file into a VIEW binary file (.VV). For more information, seeviewc(1)
,viewcs(1)
. - Use the Tuxedo .NET Workstation Client
viewcs
utility to generate classTypedVIEW
derived definition C# code and corresponding.dll
library (if necessary) from the View binary file. - Use class
TypedVIEW
to write your .NET application.Using class
TypedVIEW
provides you with two options:- Option 1: No Environment Variables
This is the most common usage of
TypedVIEW
.Use the
viewcs
utility to generate derived classTypedVIEW
definition C# code from the xxx.VV file, then compile the C# code into an.exe
file. No additional environment variables are required.See the following example:
viewcs(32) view1.VV view2.VV buildnetclient -o simpapp.exe simpapp.cs view1.cs view2.cs
- Option 2: Use .NET Assembly Environment Variables
You can use the
viewcs
utility along with .NET assembly environment variables to generate.dll
libraries. The .NET assembly environment variablesASSFILES
,ASSDIR
(ASSFILES32
,ASSDIR32
for view32) must be set accordingly in order to viewviewcs
-generated.dll
libraries.Note:
TypedView
must link to.dll
libraries instead of C# code in the .NET environment. This is because it compiles the class type into.dll
libraries or.exe
files. If the definition is compiled into both.dll
libraries and.exe
files, the output binaries for these two files are not the same.Using these environment variables,
.dll
libraries can be generated automatically or manually:Automatic viewcs -generated
.dll
librariesThis method may be used when many xxx.VV files exist. To simplify management of
TypedVIEW
C# code, these xxx.VV files can be compiled into a.dll
library.Use the
viewcs
utility to generate derived classTypedVIEW
definition C# code and corresponding.dll
library from the xxx.VV files. Manually register thelibwscdnet.dll
assembly, and then compile your client application using the.dll
library.See the following example:
viewcs(32) view.dll view1.VV view2.VV gacutil.exe /i view.dll buildnetclient -o simpapp.exe simpapp.cs view.dll set ASSFILES(32)=view.dll set ASSDIR(32)=%APDIR%
Manual-generated
.dll
LibrariesIn certain integrated programming environments (for example, VB .NET, and ASP.NET). the framework provides the executing environment. Client applications are integrated as
.dll
files. In this case it is best to manually generate.dll
libraries.Use the
viewcs
utility to generate derived classTypedVIEW
definition C# code from the xxx.VV file, then compile the C# code into an application.dll
.The .NET assembly environment variables
ASSFILES
,ASSDIR
(ASSFILES32
,ASSDIR32
for view32) must be set to application.dll
libraries and directories that haveTypedVIEW
defined.See the following example:
viewcs(32) view1.VV view2.VV csc /t:library /out:simpapp.dll /r:%TUXDIR%\bin\libwscdnet.dll simpapp.cs view1.cs view2.cs set ASSFILES(32)=simpapp.dll set ASSDIR(32)=%APDIR%
- Option 1: No Environment Variables
The Typed Buffer Sample
s file (included in the
Tuxedo . NET Workstation Client package) demonstrates how to use
FML and VIEW typed buffers.
Parent topic: Using Typed Buffers