Jump to content

WinSwitchToProgram: Difference between revisions

From EDM2
Line 14: Line 14:


Possible returns from [[WinGetLastError]]:
Possible returns from [[WinGetLastError]]:
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
* [[PM Error Codes#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]


=== Define (C/C++) ===
=== Define (C/C++) ===

Revision as of 02:17, 1 December 2019

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 Convention

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.