Jump to content

VioModeUndo: Difference between revisions

From EDM2
Created page with "==Description== Allows one thread within a process to cancel a VioModeWait issued by another thread within the same process. ==Syntax== <PRE> #define INCL_VIO #include <os2.h>..."
 
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:CPI:VioModeUndo to VioModeUndo
(No difference)

Revision as of 10:19, 10 January 2017

Description

Allows one thread within a process to cancel a VioModeWait issued by another thread within the same process.

Syntax

#define INCL_VIO
#include <os2.h>

ULONG     OwnerIndic;  /*  Ownership indicator. */
ULONG     KillIndic;   /*  Terminate indicator */
ULONG     Reserved;    /*  Reserved.  Must be 0. */
APIRET    rc;          /*  Return code. */

rc = VioModeUndo(OwnerIndic, KillIndic, Reserved);

Parameters

OwnerIndic (ULONG) - input
Ownership indicator.

Indicates whether the thread issuing VioModeUndo wants ownership of VioModeWait to be reserved for its process.

Value           Definition 
  0            Reserve ownership 
  1            Give up ownership. 
KillIndic (ULONG) - input
Terminate indicator

Indicates whether the thread (with the outstanding VioModeWait) should return an error code or be terminated.

Value              Definition 
0                    Return error code. 
1                    Terminate thread. 
Reserved (ULONG) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

VioModeUndo returns one of the following values:

  • 0 NO_ERROR
  • 421 ERROR_VIO_INVALID_PARMS
  • 422 ERROR_VIO_FUNCTION_OWNED
  • 427 ERROR_VIO_NO_MODE_THREAD
  • 430 ERROR_VIO_ILLEGAL_DURING_POPUP
  • 486 ERROR_VIO_BAD_RESERVE

Remarks

VioModeUndo can be issued only by a thread within the process that owns VioModeWait. The thread issuing VioModeUndo can either reserve ownership of the VioModeWait call for its process or give up ownership. The thread whose VioModeWait is canceled is optionally terminated.

Example Code


Related Functions

  • [[OS2 API:CPI: