Jump to content

WinSwitchToProgram: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
== WinSwitchToProgram ==
;WinSwitchToProgram(taskListHndl) : Changes active task.
; WinSwitchToProgram(taskListHndl) : Changes active task.


=== Parameters ===
=== Parameters ===
; taskListHndl - [[OS2_API:DataType:HSWITCH|HSWITCH]] - input : Task List handle returned by:
;taskListHndl - [[HSWITCH]] - input : Task List handle returned by:
* [[OS2_API:WinAddSwitchEntry|WinAddSwitchEntry]]
:* [[WinAddSwitchEntry]]
* [[OS2_API:WinCreateSwitchEntry|WinCreateSwitchEntry]]
:* [[WinCreateSwitchEntry]]
* [[OS2_API:WinQuerySwitchList|WinQuerySwitchList]]
:* [[WinQuerySwitchList]]
* [[OS2_API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
:* [[WinQuerySwitchEntry]]
 
=== Constants ===


=== Returns ===
=== Returns ===
Returns [[OS2_API:DataType:ULONG|ULONG]]:
Returns [[ULONG]]:
* 0 Successful.
* 0 Successful.
* Anything else - unsuccessful.
* Anything else - unsuccessful.


Possible returns from [[OS2_API:WinGetLastError|WinGetLastError]]:
Possible returns from [[WinGetLastError]]:
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
=== 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:HSWITCH|HSWITCH]] taskListHndl;
  HSWITCH taskListHndl;
  [[OS2 API:DataType:ULONG|ULONG]]     rc;
  ULONG    rc;
  ...
  ...
  rc = WinSwitchToProgram(taskListHndl);
  rc = WinSwitchToProgram(taskListHndl);
Line 37: Line 30:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:WinAddSwitchEntry|WinAddSwitchEntry]] [[OS2_API:WinCreateSwitchEntry|WinCreateSwitchEntry]] [[OS2_API:WinQuerySwitchList|WinQuerySwitchList]]
*[[WinAddSwitchEntry]]
[[OS2_API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
*[[WinCreateSwitchEntry]]
*[[WinQuerySwitchList]]
*[[WinQuerySwitchEntry]]


=== Notes ===
=== Notes ===
Use this function, from a foreground session, to force another session to the foreground. A nonforeground session cannot make itself a foreground session.
Use this function, from a foreground session, to force another session to the foreground. A nonforeground session cannot make itself a foreground session.
 
=== OS Version Introduced ===
 
 
[[OS2_API | Back to OS/2 API]]
 


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

Revision as of 19:26, 22 December 2016

WinSwitchToProgram(taskListHndl)
Changes active task.

Parameters

taskListHndl - HSWITCH - input
Task List handle returned by:

Returns

Returns ULONG:

  • 0 Successful.
  • Anything else - unsuccessful.

Possible returns from WinGetLastError:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Calling conversion

Cdecl32

Example Code

HSWITCH taskListHndl;
ULONG     rc;
...
rc = WinSwitchToProgram(taskListHndl);
...

Related Functions

Notes

Use this function, from a foreground session, to force another session to the foreground. A nonforeground session cannot make itself a foreground session.