en:ibm:prcp:vio:getcp

Differences

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

Link to this comparison view

en:ibm:prcp:vio:getcp [2016/02/04 09:58] – created valeriusen:ibm:prcp:vio:getcp [2016/09/15 05:00] (current) valerius
Line 1: Line 1:
 ==== VioGetCp ==== ==== VioGetCp ====
  
-**Bindings**: C, MASM +**Bindings**: [[getcp#bindings|C]][[getcp#MASM bindings|MASM]]
  
 This call allows a process to query the code page currently used to display text data.  This call allows a process to query the code page currently used to display text data. 
Line 32: Line 32:
  
 If ERROR_VIO_USER_FONT is returned, it indicates a user font that was previously loaded with [[en:ibm:prcp:vio:setfont|VioSetFont]] is the active code page.  If ERROR_VIO_USER_FONT is returned, it indicates a user font that was previously loaded with [[en:ibm:prcp:vio:setfont|VioSetFont]] is the active code page. 
 +
 +=== C bindings ===
 +
 +<code c>
 +#define INCL_VIO
 +
 +USHORT  rc = VioGetCp(Reserved, CodePageID, VioHandle);
 +
 +USHORT           Reserved;      /* Reserved (must be zero) */
 +PUSHORT          CodePageID;    /* Code page ID */
 +HVIO             VioHandle;     /* Video handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +EXTRN  VioGetCp:FAR
 +INCL_VIO            EQU 1
 +
 +PUSH   WORD    Reserved      ;Reserved (must be zero)
 +PUSH@  WORD    CodePageID    ;Code page ID
 +PUSH   WORD    VioHandle     ;Video handle
 +CALL   VioGetCp
 +
 +Returns WORD
 +</code>