The WinRUI function provides asynchronous message notification for all Windows-based RUI verbs.
int WINAPI WinRUI(
HWND hWnd,
LUA_VERB_RECORD FAR *lpVCB
);
The function returns a value indicating whether the request was accepted by the Windows-based RUI for processing. A returned value of zero indicates that the request was accepted and will be processed. A value other than zero indicates an error. Possible error codes are as follows:
The value returned in lua_flag2.async indicates whether asynchronous notification will occur. If the flag is set (nonzero), asynchronous notification will occur through a message posted to the application's message queue. If the flag is not set, the request completed synchronously. Examine the primary return code and secondary return code for any error conditions.
When the asynchronous operation is complete, the application's window hWnd receives the message returned by RegisterWindowMessage with "WinRUI" as the input string. The lParam argument contains the address of the VCB being posted as complete. The wParam argument is undefined.
Note It is possible for the request to be accepted for processing (the function call returns zero) but rejected later with a primary return code and secondary return code set in the VCB. Examine the primary return code and secondary return code for any error conditions.
If the application calls WinRUI without first initializing the session using WinRUIStartup, an error is returned.