WinTerminateApp: Difference between revisions
Appearance
m Added other INCL_* |
m corrected links |
||
Line 15: | Line 15: | ||
Possible error codes from [[OS2_API:WinGetLastError|WinGetLastError]]: | Possible error codes from [[OS2_API:WinGetLastError|WinGetLastError]]: | ||
* [[OS2_API | * [[OS2_API:PMI:error#PMERR_INVALID_HAPP|PMERR_INVALID_HAPP]] | ||
* [[OS2_API | * [[OS2_API:PMI:error#PMERR_CANNOT_STOP|PMERR_CANNOT_STOP]] | ||
=== Module === | === Module === | ||
Line 39: | Line 39: | ||
=== Notes === | === Notes === | ||
This function works only if [[OS2_API:Constant:SAF | This function works only if [[OS2_API:Constant:SAF#SAF_STARTCHILDAPP|SAF_STARTCHILDAPP]] is specified at program start. The notify window handle specified in [[OS2_API:WinStartApp|WinStartApp]] will receive the [[OS2_API:Constant:WM#WM_APPTERMINATENOTIFY|WM_APPTERMINATENOTIFY]] message. | ||
This function must be called from the same process that called [[OS2_API:WinStartApp|WinStartApp]]. | This function must be called from the same process that called [[OS2_API:WinStartApp|WinStartApp]]. | ||
This function requires the existence of a message queue on the calling thread. | This function requires the existence of a message queue on the calling thread. | ||
=== OS Version Introduced === | === OS Version Introduced === |
Revision as of 07:29, 4 March 2006
WinTerminateApp
- WinTerminateApp(appHndl)
Terminates a program started with WinStartApp.
Parameters
- appHndl - HAPP - input
The application handle as returned by WinStartApp.
Constants
Returns
Returns BOOL:
Possible error codes from WinGetLastError:
Module
Define (C/C++)
INCL_WINWINDOWMGR or INCL_WIN or INCL_PM
Export name/Ordinal
Calling conversion
Example Code
HAPP appHndl; BOOL rc; ... rc = WinTerminateApp(appHndl); ...
Related Functions
Notes
This function works only if SAF_STARTCHILDAPP is specified at program start. The notify window handle specified in WinStartApp will receive the WM_APPTERMINATENOTIFY message. This function must be called from the same process that called WinStartApp. This function requires the existence of a message queue on the calling thread.