Jump to content

WinQuerySwitchHandle: Difference between revisions

From EDM2
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinQuerySwitchHandle ==
Get a task list entry handle.
; WinQuerySwitchHandle(wndwHndl, processId) : Get a task list entry handle.


=== Parameters ===
==Syntax==
; wndwHndl - [[OS2 API:DataType:HWND|HWND]] - input : Window handle or [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]] if specifying with processId.
WinQuerySwitchHandle (wndwHndl, processId)
; processId - [[OS2 API:DataType:PID|PID]] - input : Process identifier in the task list or zero if using the window handle.


=== Constants ===
== Parameters ==
None
;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 ==
Returns of [[OS2 API:DataType:HSWITCH|HSWITCH]] with values of the switch handle or zero with an error occurring.
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 [[WinGetLastError]]:
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[PM Error Codes#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]]
* [[PM Error Codes#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]]
* [[OS2 API:PMI:error#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]]
* [[PM Error Codes#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]]


=== Module ===
== Define (C/C++) ==
 
=== Define (C/C++) ===
INCL_WINSWITCHLIST or INCL_WIN or INCL_PM
INCL_WINSWITCHLIST or INCL_WIN or INCL_PM


=== Export name/Ordinal ===
== Calling Convention ==
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  [[OS2 API:DataType:HWND|HWND]]  wndwHndl;
  HWND   wndwHndl;
  [[OS2 API:DataType:PID|PID]]    processId;
  PID     processId;
  [[OS2 API:DataType:HSWITCH|HSWITCH]] rc;
  HSWITCH rc;
  ...
  ...
  rc = WinQuerySwitchHandle(wndwHndl, [[OS2 API:Constant:NULL|NULL]]);
  rc = WinQuerySwitchHandle(wndwHndl, NULL);
  ...
  ...
 
OR
OR
 
  ...
  ...
  rc = WinQuerySwitchHandle([[OS2 API:Constant:NULL|NULL]], processId);
  rc = WinQuerySwitchHandle(NULL, processId);
  ...
  ...


=== Related Functions ===
== Related Functions ==
[[OS2 API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
*[[WinQuerySwitchEntry]]
[[OS2 API:WinQueryWindowProcess|WinQueryWindowProcess]]
*[[WinQueryWindowProcess]]
[[OS2 API:WinRemoveSwitchEntry|WinRemoveSwitchEntry]]
*[[WinRemoveSwitchEntry]]


=== Notes ===
== Notes ==
If wndwHndl and processId are used, they must be correct
If wndwHndl and processId are used, they must be correct


=== OS Version Introduced ===
[[Category:Win]]
 
 
[[OS2_API | Back to OS/2 API]]
 
 
[[Category:The OS/2 API Project]]

Latest revision as of 21:57, 6 August 2023

Get a task list entry handle.

Syntax

WinQuerySwitchHandle (wndwHndl, processId)

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 Convention

Cdecl32

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