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 notification) or a ClearPrevious value of TRUE (to clear a previous
notification request).
WLUAGLOBALHANDLER
The application has previously requested notification of status changes for all RUI_INIT verbs; it cannot
request notification for a specific session unless it first clears the “all sessions” notification.
Usage
If the application is requesting asynchronous notification of status changes using a Windows message, it must use
the RegisterWindowMessage call before its first WinRUIGetLastInitStatus call, to obtain the message
identifier that LUA will use for messages indicating status changes.
The RegisterWindowMessage call is a standard Windows function call, not specific 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 identifier (the value
returned from the RegisterWindowMessage call).
Each time the session status changes, LUA posts a message to the window handle specified on the WinRUI call.
The format of the message is as follows:
• The message identifier 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 defined 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 notification 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 specified.
2.2.5 WinRUICleanup
The application uses this function to unregister as a Windows RUI user, after it has finished issuing RUI verbs.
35