Jump to content

WinQueryTaskTitle: Difference between revisions

From EDM2
m formatting and function description
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinQueryTaskTitle ==
Get the task list entry.
; WinQueryTaskTitle(sessionId, titleReceived, titleLngth) : Get the task list entry.


==Syntax==
WinQueryTaskTitle(sessionId, titleReceived, titleLngth)


=== Parameters ===
== Parameters ==
; sessionId - [[OS2 API:DataType:ULONG|ULONG]] - input : The session identifier or zero for the caller's session.
; sessionId - [[ULONG]] - input : The session identifier or zero for the caller's session.
; titleReceived - [[OS2 API:DataType:PSZ|PSZ]]- output : Title of the application as specified with the session identifier.
; titleReceived - [[PSZ]]- output : Title of the application as specified with the session identifier.
; titleLength - [[OS2 API:DataType:ULONG|ULONG]] - input : Maximum length of title, in bytes.
; titleLength - ULONG - input : Maximum length of title, in bytes.


=== Constants ===
== Constants ==
None
None


=== Returns ===
== Returns ==
[[OS2 API:DataType:APIRET|APIRET]] with values of:
[[APIRET]] with values of:
;Zero : Success
;Zero : Success
;Nonzero : Error.
;Nonzero : Error.


[[OS2 API:WinGetLastError|WinGetLastError]] possible returns:
[[WinGetLastError]] possible returns:
* [[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_SESSION_ID|PMERR_INVALID_SESSION_ID]]
*[[PM Error Codes#PMERR_INVALID_SESSION_ID|PMERR_INVALID_SESSION_ID]]


=== 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 Convention ==
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  [[OS2 API:DataType:ULONG|ULONG]] sessionId;
  ULONG  sessionId;
  [[OS2 API:DataType:PSZ|PSZ]]   titleReceived;
  PSZ    titleReceived;
  [[OS2 API:DataType:ULONG|ULONG]] titleLngth;
  ULONG  titleLngth;
  [[OS2 API:DataType:APIRET|APIRET]] rc;
  APIRET rc;
  ...
  ...
  rc = WinQueryTaskTitle(sessionId, titleReceived, titleLngth);
  rc = WinQueryTaskTitle(sessionId, titleReceived, titleLngth);
  ...
  ...


=== Related Functions ===
== Related Functions ==
[[OS2 API:WinAddSwitchEntry|WinAddSwitchEntry]]
*[[WinAddSwitchEntry]]
[[OS2 API:WinChangeSwitchEntry|WinChangeSwitchEntry]]
*[[WinChangeSwitchEntry]]
[[OS2 API:WinCreateSwitchEntry|WinCreateSwitchEntry]]
*[[WinCreateSwitchEntry]]
[[OS2 API:WinQuerySessionTitle|WinQuerySessionTitle]]
*[[WinQuerySessionTitle]]
[[OS2 API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
*[[WinQuerySwitchEntry]]
[[OS2 API:WinQuerySwitchHandle|WinQuerySwitchHandle]]
*[[WinQuerySwitchHandle]]
[[OS2 API:WinQuerySwitchList|WinQuerySwitchList]]
*[[WinQuerySwitchList]]
[[OS2 API:WinTaskSizePos|WinTaskSizePos]]
*[[WinRemoveSwitchEntry]]
[[OS2 API:WinRemoveSwitchEntry|WinRemoveSwitchEntry]]
*[[WinSwitchToProgram]]
[[OS2 API:WinSwitchToProgram|WinSwitchToProgram]]


=== Notes ===
== Notes ==
[[OS2 API:WinQuerySessionTitle|WinQuerySessionTitle]] is the preferred API call.
[[WinQuerySessionTitle]] is the preferred API call.


=== OS Version Introduced ===
[[Category:Win]]

Latest revision as of 19:04, 14 May 2025

Get the task list entry.

Syntax

WinQueryTaskTitle(sessionId, titleReceived, titleLngth)

Parameters

sessionId - ULONG - input
The session identifier or zero for the caller's session.
titleReceived - PSZ- output
Title of the application as specified with the session identifier.
titleLength - ULONG - input
Maximum length of title, in bytes.

Constants

None

Returns

APIRET with values of:

Zero
Success
Nonzero
Error.

WinGetLastError possible returns:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Calling Convention

Cdecl32

Example Code

ULONG  sessionId;
PSZ    titleReceived;
ULONG  titleLngth;
APIRET rc;
...
rc = WinQueryTaskTitle(sessionId, titleReceived, titleLngth);
...

Related Functions

Notes

WinQuerySessionTitle is the preferred API call.