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
viewcsutility 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
viewcsutility to generate classTypedVIEWderived definition C# code and corresponding.dlllibrary (if necessary) from the View binary file. - Use class
TypedVIEWto write your .NET application.Using class
TypedVIEWprovides you with two options:- Option 1: No Environment Variables
This is the most common usage of
TypedVIEW.Use the
viewcsutility to generate derived classTypedVIEWdefinition C# code from the xxx.VV file, then compile the C# code into an.exefile. 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
viewcsutility along with .NET assembly environment variables to generate.dlllibraries. The .NET assembly environment variablesASSFILES,ASSDIR(ASSFILES32,ASSDIR32for view32) must be set accordingly in order to viewviewcs-generated.dlllibraries.Note:
TypedViewmust link to.dlllibraries instead of C# code in the .NET environment. This is because it compiles the class type into.dlllibraries or.exefiles. If the definition is compiled into both.dlllibraries and.exefiles, the output binaries for these two files are not the same.Using these environment variables,
.dlllibraries can be generated automatically or manually:Automatic viewcs -generated
.dlllibrariesThis method may be used when many xxx.VV files exist. To simplify management of
TypedVIEWC# code, these xxx.VV files can be compiled into a.dlllibrary.Use the
viewcsutility to generate derived classTypedVIEWdefinition C# code and corresponding.dlllibrary from the xxx.VV files. Manually register thelibwscdnet.dllassembly, and then compile your client application using the.dlllibrary.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
.dllLibrariesIn certain integrated programming environments (for example, VB .NET, and ASP.NET). the framework provides the executing environment. Client applications are integrated as
.dllfiles. In this case it is best to manually generate.dlllibraries.Use the
viewcsutility to generate derived classTypedVIEWdefinition C# code from the xxx.VV file, then compile the C# code into an application.dll.The .NET assembly environment variables
ASSFILES,ASSDIR(ASSFILES32,ASSDIR32for view32) must be set to application.dlllibraries and directories that haveTypedVIEWdefined.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 Samples file (included in the
Tuxedo . NET Workstation Client package) demonstrates how to use
FML and VIEW typed buffers.
Parent topic: Using Typed Buffers