Jump to content

WinQuerySwitchList: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Line 3: Line 3:


=== Parameters ===
=== Parameters ===
; anchorBlockHndl - [[OS2 API:DataType:HAB|HAB]] - input : The anchor block handle.
; anchorBlockHndl - [[HAB]] - input : The anchor block handle.
; swblockStruct - [[OS2 API:DataType:SWBLOCK|SWBLOCK]] - output : Pass the [[OS2 API:DataType:SWBLOCK|SWBLOCK]] struct for population or [[OS2_API:Constant:NULL|NULL]] to get the number of switch entries.
; swblockStruct - [[SWBLOCK]] - output : Pass the [[OS2 API:DataType:SWBLOCK|SWBLOCK]] struct for population or [[NULL]] to get the number of switch entries.
; swblockStructSize - [[OS2 API:DataType:ULONG|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.
 
=== Constants ===
None


=== Returns ===
=== Returns ===
Line 18: Line 15:
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_NO_SPACE|PMERR_NO_SPACE]]
* [[OS2 API:PMI:error#PMERR_NO_SPACE|PMERR_NO_SPACE]]
=== Module ===


=== Define (C/C++) ===
=== Define (C/C++) ===
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling conversion ===
Line 30: Line 23:


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:HAB|HAB]]     anchorBlockHndl;
  HAB    anchorBlockHndl;
  [[OS2 API:DataType:SWBLOCK|SWBLOCK]] swblockStruct;
  SWBLOCK swblockStruct;
  [[OS2 API:DataType:ULONG|ULONG]]   swblockStructSize;
  ULONG  swblockStructSize;
  [[OS2 API:DataType:ULONG|ULONG]]   rc;
  ULONG  rc;
  ...
  ...
  rc = WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize);
  rc = WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize);
Line 39: Line 32:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:WinAddSwitchEntry|WinAddSwitchEntry]]
*[[WinAddSwitchEntry]]
[[OS2 API:WinCreateSwitchEntry|WinCreateSwitchEntry]]
*[[WinCreateSwitchEntry]]
[[OS2 API:WinQuerySwitchHandle|WinQuerySwitchHandle]]
*[[WinQuerySwitchHandle]]
[[OS2 API:WinQueryTaskTitle|WinQueryTaskTitle]]
*[[WinQueryTaskTitle]]


=== Notes ===
=== Notes ===
Invisible entries in the task list can have their information returned (via the [[OS2 API:DataType:SWCTL|SWCTL]].uchVisibility flag in [[OS2_API:WinAddSwitchEntry|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.
 
=== OS Version Introduced ===
 
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Win]]

Revision as of 15:58, 3 December 2016

WinQuerySwitchList

WinQuerySwitchList(anchorBlockHndl, swblockStruct, swblockStructSize)
Get the information about the entries in the task list.

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 conversion

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.