en:docs:fapi:vioscrlock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:docs:fapi:vioscrlock [2021/08/27 14:11] prokusheven:docs:fapi:vioscrlock [2021/09/19 04:46] (current) prokushev
Line 1: Line 1:
 {{page>en:templates:fapiint}} {{page>en:templates:fapiint}}
 +====== VioScrLock ====== 
 + 
 This call requests ownership of (locks) the physical display buffer. This call requests ownership of (locks) the physical display buffer.
  
-==Syntax== +===== Syntax ===== 
- VioScrLock (WaitFlag, Status, VioHandle)+<code c> 
 +VioScrLock (WaitFlag, Status, VioHandle) 
 +</code> 
 +===== Parameters ===== 
 + 
 +  * WaitFlag ([[USHORT]]) - input : Indicates whether the process should block until the screen I/O can take place. 
 + 
 +^ Value ^ Definition ^ 
 +| 0 | Return if screen I/O not available | 
 +| 1 | Wait until screen I/O is available | 
 + 
 +  * Status ([[PUCHAR]]) - output : Address of the Indicator of whether the lock is successful, described below. 
 + 
 +^ Value ^ Definition ^ 
 +| 0 | Lock successful | 
 +| 1 | Lock unsuccessful (in the case of no wait) |
  
-==Parameters==  
-;WaitFlag (USHORT) - input : Indicates whether the process should block until the screen I/O can take place. 
- '''Value        Definition''' 
-        Return if screen I/O not available 
-        Wait until screen I/O is available. 
-; Status (PUCHAR) - output : Address of the Indicator of whether the lock is successful, described below. 
- '''Value            Definition''' 
-            Lock successful 
-            Lock unsuccessful (in the case of no wait). 
 Status is returned only when AX = 0. Status is returned only when AX = 0.
  
 Status = 1 may be returned only when WaitFlag = 0. Status = 1 may be returned only when WaitFlag = 0.
-; VioHandle (HVIO) - input : Reserved word of 0s. 
  
-==Return Code== +  * VioHandle ([[HVIO]]) - input : Reserved word of 0s. 
- rc (USHORT) - return+ 
 +===== Return Code ===== 
 + 
 + rc ([[USHORT]]) - return 
 Return code descriptions are: Return code descriptions are:
 +
   * 0          NO_ERROR    * 0          NO_ERROR 
   * 366        ERROR_VIO_WAIT_FLAG    * 366        ERROR_VIO_WAIT_FLAG 
Line 31: Line 42:
   * 494        ERROR_VIO_EXTENDED_SG   * 494        ERROR_VIO_EXTENDED_SG
  
-==Remarks==+===== Remarks ===== 
 This function call permits a process to determine if I/O to the physical screen buffer can take place. This prevents the process from writing to the physical buffer when the process is in the background. Processes must cooperate with the system in coordinating screen accesses. This function call permits a process to determine if I/O to the physical screen buffer can take place. This prevents the process from writing to the physical buffer when the process is in the background. Processes must cooperate with the system in coordinating screen accesses.
  
Line 38: Line 50:
 When the screen lock is in effect and another thread in the same or different process (in the same session) issues VioScrLock, the second thread receives an error code. VioScrUnLock must be issued by a thread within the same process that issued VioScrLock. When the screen lock is in effect and another thread in the same or different process (in the same session) issues VioScrLock, the second thread receives an error code. VioScrUnLock must be issued by a thread within the same process that issued VioScrLock.
  
-===Family API Considerations===+==== Family API Considerations ===
 Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to VioScrLock when coding in the DOS mode: Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to VioScrLock when coding in the DOS mode:
  
 The status always indicates the lock is successful (Return code = 0).  The status always indicates the lock is successful (Return code = 0). 
  
-==Example Code== +===== Bindings ===== 
-=== C Binding=== + 
-<PRE>+==== C Binding==== 
 +<code c>
 #define INCL_VIO #define INCL_VIO
  
Line 55: Line 69:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code>
  
-===MASM Binding=== +====MASM Binding==== 
-<PRE>+<code asm>
 EXTRN  VioScrLock:FAR EXTRN  VioScrLock:FAR
 INCL_VIO            EQU 1 INCL_VIO            EQU 1
Line 68: Line 82:
  
 Returns WORD Returns WORD
 +</code>
  
- +===== Note =====
-====== Note ======+
  
 Text based on [[http://www.edm2.com/index.php/VioScrLock_(FAPI)]] Text based on [[http://www.edm2.com/index.php/VioScrLock_(FAPI)]]