HP-UX SNAplus2 R7 LUA Programmer's Guide

Designing and Writing LUA Applications
LUA Entry Points for Windows Applications
The application has not issued the WinRUIStartup call, which is required before issuing any LUA verbs.
WLUAUNKNOWN
Internal error: the session status is unknown.
WLUASIDINVALID
The supplied
Sid parameter did not match the session ID of an outstanding RUI_INIT verb.
WLUASIDZERO
The application supplied a zero session ID (indicating all sessions), but did not specify either a
Windows handle (to indicate asynchronous notication) or a ClearPrevious value of TRUE (to clear a previous
notication request).
WLUAGLOBALHANDLER
The application has previously requested notication of status changes for all RUI_INIT verbs; it cannot
request notication for a specic session unless it rst clears the all sessions notication.
Usage
If the application is requesting asynchronous notication of status changes using a Windows message, it must use
the RegisterWindowMessage call before its rst WinRUIGetLastInitStatus call, to obtain the message
identier that LUA will use for messages indicating status changes.
The RegisterWindowMessage call 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 calls to this function; the returned value will be the same for all calls issued by the application.)
The application must pass the string WinRUI to the function; the returned value is a message identier (the value
returned from the RegisterWindowMessage call).
Each time the session status changes, LUA posts a message to the window handle specied on the WinRUI call.
The format of the message is as follows:
The message identier is the value returned from the RegisterWindowMessage call.
The lParam argument contains either the correlator value supplied to the original RUI_INIT verb or the session
ID returned on the original RUI_INIT verb, as dened by the NotifyType parameter. The application can use
this value to correlate the message with the original verb.
The wParam argument contains the session status (one of the values listed for successful execution in Section
2.2.4, WinRUIGetLastInitStatus), or the value
WLUAUNKNOWN if an internal error occurred during processing.
If the application is requesting asynchronous notication of status changes using an event handle, implement it as
follows:
WinRUIGetLastInitStatus(Sid,EventHandle,WLUA_NOTIFY_EVENT,FALSE);
The event whose handle is given will be signaled when a change in state occurs. Since no information is returned
when an event is signaled, a further call must be issued to determine the status, as follows:
Status = WinRUIGetLastInitStatus(Sid,NULL,0,FALSE);
Note
In this case, a Sid must be specied.
2.2.5 WinRUICleanup
The application uses this function to unregister as a Windows RUI user, after it has nished issuing RUI verbs.
35