Jump to content

WinQuerySwitchHandle: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
mNo edit summary
Line 4: Line 4:
  WinQuerySwitchHandle (wndwHndl, processId)
  WinQuerySwitchHandle (wndwHndl, processId)


=== Parameters ===
== Parameters ==
;wndwHndl - [[HWND]] - input : Window handle or [[NULLHANDLE]] if specifying with processId.
;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.
;processId - [[PID]] - input : Process identifier in the task list or zero if using the window handle.


=== Returns ===
== Returns ==
Returns of [[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.


Line 16: Line 16:
* [[PM Error Codes#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]]
* [[PM Error Codes#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 Convention ===
== Calling Convention ==
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  HWND    wndwHndl;
  HWND    wndwHndl;
  PID    processId;
  PID    processId;
Line 34: Line 34:
  ...
  ...


=== Related Functions ===
== Related Functions ==
*[[WinQuerySwitchEntry]]
*[[WinQuerySwitchEntry]]
*WinQueryWindowProcess
*WinQueryWindowProcess
*[[WinRemoveSwitchEntry]]
*[[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:Win]]

Revision as of 05:24, 20 May 2018

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