Jump to content

WinQuerySwitchList: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== WinQuerySwitchList ==
Get the information about the entries in the task list.
; WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize) : Get the information about the entries in the task list.


=== Parameters ===
==Syntax==
WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize)
 
== Parameters ==
; anchorBlockHndl - [[HAB]] - input : The anchor block handle.
; anchorBlockHndl - [[HAB]] - input : The anchor block handle.
; swblockStruct - SWBLOCK - output : Pass the SWBLOCK struct for population or [[NULL]] to get the number of switch entries.
; swblockStruct - SWBLOCK - output : Pass the SWBLOCK struct for population or [[NULL]] to get the number of switch entries.
; swblockStructSize - [[ULONG]] - input : Size of swblockStruct, in bytes.  This is not a count of entries in swblockStruct.
; swblockStructSize - [[ULONG]] - input : Size of swblockStruct, in bytes.  This is not a count of entries in swblockStruct.


=== Returns ===
== Returns ==
[[OS2 API:DataType:ULONG|ULONG]] with values of:
[[ULONG]] with values of:
; Zero : Error occurred.
; Zero : Error occurred.
; Non-zero : Number of switch list entries in the system.
; Non-zero : Number of switch list entries in the system.


Possible errors receivable from [[WinGetLastError]]:
Possible errors receivable 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_NO_SPACE|PMERR_NO_SPACE]]
* [[PM Error Codes#PMERR_NO_SPACE|PMERR_NO_SPACE]]


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


=== Calling conversion ===
== Calling Convention ==
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  HAB    anchorBlockHndl;
  HAB    anchorBlockHndl;
  SWBLOCK swblockStruct;
  SWBLOCK swblockStruct;
Line 31: Line 33:
  ...
  ...


=== Related Functions ===
== Related Functions ==
*[[WinAddSwitchEntry]]
*[[WinAddSwitchEntry]]
*[[WinCreateSwitchEntry]]
*[[WinCreateSwitchEntry]]
Line 37: Line 39:
*[[WinQueryTaskTitle]]
*[[WinQueryTaskTitle]]


=== Notes ===
== Notes ==
Invisible entries in the task list can have their information returned (via the SWCTL.uchVisibility flag in [[WinAddSwitchEntry]]).  Using this feature, information will be retrieved that the user does not see in the task list.
Invisible entries in the task list can have their information returned (via the SWCTL.uchVisibility flag in [[WinAddSwitchEntry]]).  Using this feature, information will be retrieved that the user does not see in the task list.


[[Category:Win]]
[[Category:Win]]

Latest revision as of 02:19, 1 December 2019

Get the information about the entries in the task list.

Syntax

WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize)

Parameters

anchorBlockHndl - HAB - input
The anchor block handle.
swblockStruct - SWBLOCK - output
Pass the SWBLOCK struct for population or NULL to get the number of switch entries.
swblockStructSize - ULONG - input
Size of swblockStruct, in bytes. This is not a count of entries in swblockStruct.

Returns

ULONG with values of:

Zero
Error occurred.
Non-zero
Number of switch list entries in the system.

Possible errors receivable from WinGetLastError:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Calling Convention

Cdecl32

Example Code

HAB     anchorBlockHndl;
SWBLOCK swblockStruct;
ULONG   swblockStructSize;
ULONG   rc;
...
rc = WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize);
...

Related Functions

Notes

Invisible entries in the task list can have their information returned (via the SWCTL.uchVisibility flag in WinAddSwitchEntry). Using this feature, information will be retrieved that the user does not see in the task list.