Jump to content

WinWaitForShell: Difference between revisions

From EDM2
Added ordinal and DLL information
Added some implementation details
Line 49: Line 49:
=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp 4
OS/2 Warp 4
=== Implementation details ===
This function queries or waits for three event semaphores created by [[OS2 API:WinStartShell|WinStartShell]] during WPS bootup. These events are:
\\SEM32\\WORKPLAC\\SHELL1WT.SEM
\\SEM32\\WORKPLAC\\SHELL2WT.SEM
\\SEM32\\WORKPLAC\\SHELL3WT.SEM
Each according to the three [[OS2 API:Constant:WWFS|WWFS-constants]]. Calling [[OS2_API:WinWaitForShell|WinWaitForShell]] before the second instance of PMShell is started is valid as long as the [[OS2 API:Constant:WWFS#WWFS_QUERY|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 [[OS2 API:WinWaitForShell|WinWaitForShell].

Revision as of 13:21, 30 May 2005

WinWaitForShell

WinWaitForShell(event)

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

Parameters

event - ULONG - input

The event being waited upon.

Constants

Constants defined for event:

Returns

Returns BOOL with the values of:

Module

Define (C/C++)

INCL_WINWORKPLACE

Export name/Ordinal

Exported as ordinal 512 from PMWP.DLL.

Calling conversion

Cdecl32

Example Code

BOOL rc;
...
rc = WinWaitForShell(WWFS_DESKTOPPOPULATED); // Desktop populated
...

Related Functions

WinNotebookButtonFromID

Notes

When calling WinWaitForShell from processes started by a RUN= statement in config.sys, you must specify the WWFS_QUERY flag. Else the call will fail.

A message queue is not required for the thread which calls WinWaitForShell.

The prototype and defines for this function are defined in wpobject.h, which may be inaccessible if not compiling a WPS object class. Copy the defines and the prototype verbatim into your own code or headers for use. It is exported through os2386.lib in the OS/2 Warp 4 Toolkit.

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 [[OS2 API:WinWaitForShell|WinWaitForShell].