WinTerminateApp: Difference between revisions
Appearance
m Martini moved page OS2 API:WinTerminateApp to OS2 API:PMI:WinTerminateApp |
No edit summary |
||
Line 1: | Line 1: | ||
== WinTerminateApp == | == WinTerminateApp == | ||
; WinTerminateApp(appHndl) : Terminates a program started with [[ | ; WinTerminateApp(appHndl) : Terminates a program started with [[WinStartApp]]. | ||
=== Parameters === | === Parameters === | ||
; appHndl - [[ | ;appHndl - [[HAPP]] - input : The application handle as returned by WinStartApp. | ||
=== Returns === | === Returns === | ||
Returns [[ | Returns [[BOOL]]: | ||
* [[ | * [[TRUE]] | ||
* [[ | * [[FALSE]] | ||
Possible error codes from [[OS2_API:WinGetLastError|WinGetLastError]]: | Possible error codes from [[OS2_API:WinGetLastError|WinGetLastError]]: | ||
* [[OS2_API:PMI:error#PMERR_INVALID_HAPP|PMERR_INVALID_HAPP]] | * [[OS2_API:PMI:error#PMERR_INVALID_HAPP|PMERR_INVALID_HAPP]] | ||
* [[OS2_API:PMI:error#PMERR_CANNOT_STOP|PMERR_CANNOT_STOP]] | * [[OS2_API:PMI:error#PMERR_CANNOT_STOP|PMERR_CANNOT_STOP]] | ||
=== Define (C/C++) === | === Define (C/C++) === | ||
INCL_WINWINDOWMGR or INCL_WIN or INCL_PM | INCL_WINWINDOWMGR or INCL_WIN or INCL_PM | ||
=== Calling conversion === | === Calling conversion === | ||
Line 27: | Line 21: | ||
=== Example Code === | === Example Code === | ||
HAPP appHndl; | |||
BOOL rc; | |||
... | ... | ||
rc = WinTerminateApp(appHndl); | rc = WinTerminateApp(appHndl); | ||
Line 34: | Line 28: | ||
=== Related Functions === | === Related Functions === | ||
[[ | *[[WinStartApp]] | ||
=== Notes === | === Notes === | ||
This function works only if [[OS2_API:Constant:SAF#SAF_STARTCHILDAPP|SAF_STARTCHILDAPP]] is specified at program start. | This function works only if [[OS2_API:Constant:SAF#SAF_STARTCHILDAPP|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 | 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. | This function requires the existence of a message queue on the calling thread. | ||
[[Category:Win]] | |||
[[Category: |
Revision as of 18:38, 29 November 2016
WinTerminateApp
- WinTerminateApp(appHndl)
- Terminates a program started with WinStartApp.
Parameters
- appHndl - HAPP - input
- The application handle as returned by WinStartApp.
Returns
Returns BOOL:
Possible error codes from WinGetLastError:
Define (C/C++)
INCL_WINWINDOWMGR or INCL_WIN or INCL_PM
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.