subcalls.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
VioModeUndo (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioModeUndo(fRelinquish, fTerminate, hvio)
USHORT fRelinquish;    /* ownership flag   */
USHORT fTerminate;     /* termination flag */
USHORT hvio;           /* video handle     */
 
The VioModeUndo function cancels a request by a process to be notified of a
change in video mode. A process makes this request by calling the
VioModeWait function. The request forces the calling thread to wait until
the video mode changes. The VioModeUndo function cancels the request and
permits the thread to continue (or ends the thread, if requested to do so).
 
MS OS/2 permits only one process in a screen group to request notification
of a video-mode change. The first process to make a request owns it.
Thereafter, other processes must wait for the owning process to relinquish
the request before being granted ownership. To force a process to relinquish
ownership of the request, use the VioModeUndo function.
 
Only the process that owns the change-mode request may call the VioModeUndo
function.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
fRelinquish  Specifies whether the process should retain or relinquish
             ownership of the request. If this parameter is UNDOI_GETOWNER,
             the process retains ownership and can make the request again
             without competing with other processes. If this parameter is
             UNDOI_RELEASEOWNER, the process relinquishes ownership of the
             request and is canceled by VioModeUndo.
 
fTerminate   Specifies whether to terminate the thread waiting for the mode
             change. If this parameter is UNDOK_ERRORCODE, the thread
             continues and receives an error value from the VioModeWait
             function. If the parameter is UNDOK_TERMINATE, the thread
             terminates.
 
hvio         Identifies an advanced video-input-and-output (AVIO)
             presentation space. For AVIO programs, this handle must have
             been created previously using the VioCreatePS function. For
             other programs, hvio must be NULL.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_VIO_FUNCTION_OWNED
     ERROR_VIO_INVALID_PARMS
     ERROR_VIO_NO_MODE_THREAD
 
See Also
 
VioCreatePS, VioModeWait