HP-UX SNAplus2 R7 LUA Programmer's Guide

Designing and Writing LUA Applications
Windows Environment Considerations
usr/include/sna/values_c.h; these two les contain all the constants dened for supplied and returned
parameter values at the LUA interface. The le values_c.h also includes denitions of parameter types such as
AP_UINT16 that are used in the LUA VCBs.
2.7.2 Multiple Processes and Multiple Sessions
If the process that issued RUI_INIT, RUI_INIT_PRIMARY, or SLI_OPEN then forks to create a child process,
the child process cannot issue any LUA verbs on the session started by the parent process; the verbs will fail
with return codes
LUA_UNSUCCESSFUL
and LUA_INVALID_PROCESS. It can, however, issue another RUI_INIT,
RUI_INIT_PRIMARY, or SLI_OPEN to obtain its own session.
A single process may simultaneously use more than one LUA session, by issuing multiple RUI_INIT,
RUI_INIT_PRIMARY, or SLI_OPEN verbs. Each session must use a different LU, but two or more sessions may
use the same pool.
Two or more instances of the same LUA application can be run as different processes, but they must use different
LUs. This can be done either by providing a mechanism for specifying the LU name at run time, or by using LU
pools; if the two processes specify the same pool, they will be allocated different LUs from that pool.
2.7.3 Compiling and Linking the LUA Application
To compile and link 32bit applications, use the following options:
+DA1.0 -I /usr/include/sna -L /opt/sna/lib -llua -lsna -lpthread
To compile and link 64bit applications, use the following options:
+DA2.0w -I /usr/include/sna -L /opt/sna/lib/pa20_64 -llua -lsna -lpthread
For an SLI application, add ---lsli.
2.8 Windows Environment Considerations
WINDOWS
This section summarizes processing considerations of which you must be aware when developing LUA applications
on a Windows client.
2.8.1 Multiple Sessions and Multiple Tasks
A single task may simultaneously use more than one LUA session, by issuing multiple RUI_INIT or SLI_OPEN
verbs. Each session must use a different LU, but two or more sessions may use the same pool.
Two or more instances of the same LUA application can be run as different tasks, but they must use different LUs.
This can be done by using LU pools; the two tasks can specify the same pool, and will be allocated different LUs
from that pool.
2.8.2 Compiling and Linking LUA Programs
This section provides information about compiling and linking LUA programs on a Windows client.
Compiler Options for Structure Packing
The VCB structures for LUA verbs are not packed. Do not use compiler options that change this packing method.
50