HP-UX SNAplus2 R7 LUA Programmer's Guide

Designing and Writing LUA Applications
LUA Entry Points for Windows Applications
hWnd
A window handle that LUA will use to post a message indicating asynchronous verb completion.
lpVCB
A pointer to the VCB structure for the verb. For the WinSLI function, the lua_post_handle parameter is
reserved; leave it as 0 (zero).
For more information about the VCB structure, see Chapter 3, LUA VCB Structure. For more information
about on its usage for individual verbs, see Chapter 5, SLI Verbs.
Note
The LUA VCB contains many parameters marked as reserved; some of these are
used internally by the SNAplus2 software, and others are not used in this version
but may be used in future versions. Your application must not attempt to access any
of these reserved parameters; instead, it must set the entire contents of the VCB to
zero to ensure that all of these parameters are zero, before it sets other parameters
that are used by the verb. This ensures that SNAplus2 will not misinterpret any of
its internally-used parameters, and also that your application will continue to work
with future SNAplus2 versions in which these parameters may be used to provide
new functions.
To set the VCB contents to zero, use memset:
memset(vcb, 0, sizeof(vcb));
Returned Values
The return value from the function is one of the following:
0
(zero)
The function call was accepted, and the LUA verb will be processed. The application should check the
lua_ag2.async parameter in the VCB structure to determine whether the verb has already completed syn-
chronously or will complete asynchronously, as described in Section 2.2.9, WinSLI.
WLUAINVALIDHANDLE
The supplied hWnd parameter was not a valid window handle.
WLUASTARTUPNOTCALLED
The application has not issued the WinSLIStartup call, which is required before issuing any SLI verbs.
For information about the parameters returned in the VCB structure, see the descriptions of individual verbs in
Chapter 5, SLI Verbs.
Usage
Before using WinSLI for the rst time, the application must use the RegisterWindowMessage call
to obtain the message identier that LUA will use for messages indicating asynchronous verb completion.
RegisterWindowMessage is a standard Windows function call, not specic to LUA; refer to your Windows
documentation for more information about the function. (There is no need to issue the call again before subsequent
LUA verbs; the returned value will be the same for all calls issued by the application.)
The application must pass the string WinSLI to the function; the returned value is a message identier (the value
returned from the RegisterWindowMessage call).
Each time an LUA verb that was issued using the WinSLI entry point completes asynchronously, LUA posts a
message to the window handle specied on the WinSLI call. The format of the message is as follows:
The message identier is the value returned from the RegisterWindowMessage call.
40