Jump to content

VioGetCp: Difference between revisions

From EDM2
Created page with "==Description== Queries the code page currently used to display text data. ==Syntax== <PRE> #define INCL_VIO #include <os2.h> ULONG Reserved; /* Reserved. Must be ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
Queries the code page currently used to display text data.
Queries the code page currently used to display text data.


==Syntax==
==Syntax==
<PRE>
VioGetCp(Reserved, CodePageID, VioHandle)
#define INCL_VIO
#include <os2.h>


ULONG      Reserved;    /*  Reserved.  Must be 0. */
PUSHORT    CodePageID;  /*  Code-page ID. */
HVIO      VioHandle;  /*  Presentation-space handle. */
APIRET    rc;          /*  Return code. */
rc = VioGetCp(Reserved, CodePageID, VioHandle);
</PRE>
==Parameters==
==Parameters==
; Reserved (ULONG) - input : Reserved. Must be 0.  
;Reserved (ULONG) - input: Reserved. Must be 0.
 
;CodePageID (PUSHORT) - output: Code-page ID.
; CodePageID (PUSHORT) - output : Code-page ID.
:The address of a word in the application's data area. The current video code page is returned in this word.
The address of a word in the application's data area. The current video code page is returned in this word.  
;VioHandle (HVIO) - input: Presentation-space handle.
:This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by [[VioCreatePS]].


; VioHandle (HVIO) - input : Presentation-space handle.
This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.
==Return Code==
==Return Code==
rc (APIRET) - returns
;rc (APIRET) - returns:VioGetCp returns one of the following values:
*0 NO_ERROR
*355 ERROR_VIO_MODE
*421 ERROR_VIO_INVALID_PARMS
*436 ERROR_VIO_INVALID_HANDLE


VioGetCp returns one of the following values:
* 0          NO_ERROR
* 355        ERROR_VIO_MODE
* 421        ERROR_VIO_INVALID_PARMS
* 436        ERROR_VIO_INVALID_HANDLE
==Remarks==
==Remarks==
The display code-page ID, previously set by VioSetCp or inherited from the requesting process, is returned to the caller. The returned code-page tag is the currently active code page.  
The display code-page ID, previously set by [[VioSetCp]] or inherited from the requesting process, is returned to the caller. The returned code-page tag is the currently active code page.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 


[[Category:The OS/2 API Project]]
[[Category:Vio]]

Latest revision as of 21:55, 1 January 2020

Queries the code page currently used to display text data.

Syntax

VioGetCp(Reserved, CodePageID, VioHandle)

Parameters

Reserved (ULONG) - input
Reserved. Must be 0.
CodePageID (PUSHORT) - output
Code-page ID.
The address of a word in the application's data area. The current video code page is returned in this word.
VioHandle (HVIO) - input
Presentation-space handle.
This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.

Return Code

rc (APIRET) - returns
VioGetCp returns one of the following values:
  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 421 ERROR_VIO_INVALID_PARMS
  • 436 ERROR_VIO_INVALID_HANDLE

Remarks

The display code-page ID, previously set by VioSetCp or inherited from the requesting process, is returned to the caller. The returned code-page tag is the currently active code page.