WinWaitForShell

Allows an application to wait for the Workplace Shell to become available.

Syntax
WinWaitForShell (ulEvent)

Parameters

 * ulEvent (ULONG) input : ulEvent has the following flags which indicate which event is to be queried. One, and only one, of these flags must be turned on.

Constants defined for event:
 * WWFS_QUERY - Query if the event has taken place. If this flag is not turned on then this call will block until the event has taken place.
 * WWFS_DESKTOPCREATED - Desktop has been created.
 * WWFS_DESKTOPOPENED - A view of the Desktop has been opened.
 * WWFS_DESKTOPPOPULATED - The desktop has been populated.

Returns
Returns BOOL with the values of:
 * TRUE - Event has taken place.
 * FALSE - Event has not taken place.
 * PMERR_INVALID_PARAMETER (0x1208) - One of the defined WWFS_DESKTOP* flags was not passed in ulEvent.

Export name/Ordinal
Exported as ordinal 512 from PMWP.DLL.

Calling Convention
Cdecl32

OS Version Introduced
OS/2 Warp 4

Implementation details
This function queries or waits for three event semaphores created by WinStartShell during WPS bootup. These events are: \\SEM32\\WORKPLAC\\SHELL1WT.SEM \\SEM32\\WORKPLAC\\SHELL2WT.SEM \\SEM32\\WORKPLAC\\SHELL3WT.SEM Each according to the three WWFS constants. Calling WinWaitForShell before the second instance of PMShell is started is valid as long as the WWFS_QUERY bit is specified.

Once posted, the events are not reset again, so to be able to wait for the shell to come back up after resetting it programmatically, the events must be reset by the calling process. Reset the events right before killing WPS, not before calling WinWaitForShell.

Example Code
This example checks (non-blocking) to see if the Workplace Shell Desktop to be populated has been populated or not.

Related Functions

 * WinNotebookButtonFromID