HP-UX SNAplus2 R7 LUA Programmer's Guide

Designing and Writing LUA Applications
LUA Entry Points for Windows Applications
lua_ag2.async bit is set to 1. The application can now perform other processing, or wait for notication from
LUA that the verb has completed. LUA issues this notication by setting the primary return code to its nal value,
leaving the lua_ag2.async bit set to 1.
As part of the supplied VCB, the application supplies an event handle in the lua_post_handle parameter. The event
must be in the nonsignaled state and the handle must have EVENT_MODIFY_STATE access to the event. If the
verb completes synchronously, LUA does not signal this event handle. If the verb completes asynchronously, LUA
indicates the verb completion by signaling the event handle.
The application issues a WaitForSingleObject or WaitForMultipleObject call to wait on the event
handle. When the event is signaled, the application examines the primary return code and secondary return code to
check for errors.
It is not possible for an application to predict whether a particular verb will complete synchronously or
asynchronously.
2.2.8 WinSLIStartup
The application uses this function to register as a Windows SLI user, and to determine whether the LUA software
supports the Windows LUA version that it requires.
Function Call
int WINAPI WinSLIStartup (
WORD wVersionRequired;
LUADATA far * lpData;
)
typedef struct
{
WORD wVersion;
char szDescription[41];
} LUADATA;
Supplied Parameters
Supplied parameter is:
wVersionRequired
The version of Windows LUA that the application requires. SNAplus2 supports Version 1.0.
The low-order byte species the major version number, and the high-order byte species the minor version
number. For example:
Version wVersionRequired
1.0 0x0001
1.1 0x0101
2.0 0x0002
If the application can use more than one version, it should specify the highest version that it can use.
Returned Values
The return value from the function is one of the following:
0 (zero)
The application was registered successfully, and the Windows LUA software supports either the version
number specied by the application or a lower version. The application should check the version number in
the
LUADATA structure to ensure that it is high enough.
38