WinQuerySwitchHandle: Difference between revisions
Appearance
m Martini moved page OS2 API:WinQuerySwitchHandle to OS2 API:PMI:WinQuerySwitchHandle |
mNo edit summary |
||
Line 1: | Line 1: | ||
;WinQuerySwitchHandle(wndwHndl, processId) : Get a task list entry handle. | |||
; WinQuerySwitchHandle(wndwHndl, processId) : Get a task list entry handle. | |||
=== Parameters === | === Parameters === | ||
; wndwHndl - [[ | ;wndwHndl - [[HWND]] - input : Window handle or [[NULLHANDLE]] if specifying with processId. | ||
; processId - [[ | ;processId - [[PID]] - input : Process identifier in the task list or zero if using the window handle. | ||
=== Returns === | === Returns === | ||
Returns of [[ | Returns of [[HSWITCH]] with values of the switch handle or zero with an error occurring. | ||
Possible returns from [[OS2 API:WinGetLastError|WinGetLastError]]: | Possible returns from [[OS2 API:WinGetLastError|WinGetLastError]]: | ||
Line 16: | Line 12: | ||
* [[OS2 API:PMI:error#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]] | * [[OS2 API:PMI:error#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]] | ||
* [[OS2 API:PMI:error#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]] | * [[OS2 API:PMI:error#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]] | ||
=== Define (C/C++) === | === Define (C/C++) === | ||
INCL_WINSWITCHLIST or INCL_WIN or INCL_PM | INCL_WINSWITCHLIST or INCL_WIN or INCL_PM | ||
=== Calling conversion === | === Calling conversion === | ||
Line 28: | Line 20: | ||
=== Example Code === | === Example Code === | ||
HWND wndwHndl; | |||
PID processId; | |||
HSWITCH rc; | |||
... | ... | ||
rc = WinQuerySwitchHandle(wndwHndl, | rc = WinQuerySwitchHandle(wndwHndl, NULL); | ||
... | ... | ||
OR | |||
... | ... | ||
rc = WinQuerySwitchHandle([[ | rc = WinQuerySwitchHandle([[NULL]], processId); | ||
... | ... | ||
=== Related Functions === | === Related Functions === | ||
[[ | *[[WinQuerySwitchEntry]] | ||
[[ | *[[WinQueryWindowProcess]] | ||
[[ | *[[WinRemoveSwitchEntry]] | ||
=== Notes === | === Notes === | ||
If wndwHndl and processId are used, they must be correct | If wndwHndl and processId are used, they must be correct | ||
[[Category:Win]] | |||
[[Category: |
Revision as of 18:59, 23 December 2016
- WinQuerySwitchHandle(wndwHndl, processId)
- Get a task list entry handle.
Parameters
- wndwHndl - HWND - input
- Window handle or NULLHANDLE if specifying with processId.
- processId - PID - input
- Process identifier in the task list or zero if using the window handle.
Returns
Returns of HSWITCH with values of the switch handle or zero with an error occurring.
Possible returns from WinGetLastError:
Define (C/C++)
INCL_WINSWITCHLIST or INCL_WIN or INCL_PM
Calling conversion
Example Code
HWND wndwHndl; PID processId; HSWITCH rc; ... rc = WinQuerySwitchHandle(wndwHndl, NULL); ...
OR
... rc = WinQuerySwitchHandle(NULL, processId); ...
Related Functions
Notes
If wndwHndl and processId are used, they must be correct