Jump to content

WinSwitchToProgram: Difference between revisions

From EDM2
Created
 
m formatting
Line 1: Line 1:
== WinSwitchToProgram ==
== WinSwitchToProgram ==
; WinSwitchToProgram(taskListHndl) :
; WinSwitchToProgram(taskListHndl) : Changes active task.
Changes active task.


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

Revision as of 04:11, 1 May 2006

WinSwitchToProgram

WinSwitchToProgram(taskListHndl)
Changes active task.

Parameters

taskListHndl - HSWITCH - input
Task List handle returned by:

Constants

Returns

Returns ULONG:

  • 0 Successful.
  • Anything else - unsuccessful.

Possible returns from WinGetLastError:

Module

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Export name/Ordinal

Calling conversion

Cdecl32

Example Code

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

Related Functions

WinAddSwitchEntry WinCreateSwitchEntry WinQuerySwitchList WinQuerySwitchEntry

Notes

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