en:docs:fapi:dossetcp

Differences

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

Link to this comparison view

en:docs:fapi:dossetcp [2021/08/20 06:55] – created prokusheven:docs:fapi:dossetcp [2021/11/04 13:59] (current) prokushev
Line 1: Line 1:
 {{page>en:templates:fapiint}} {{page>en:templates:fapiint}}
 +
 +====== DosSetCp ======
  
 This call allows a process to set its code page and the session's display code page and keyboard code page. This call allows a process to set its code page and the session's display code page and keyboard code page.
  
-==Syntax==+===== Syntax ===== 
 +<code c>
  DosSetCp (CodePage, Reserved)  DosSetCp (CodePage, Reserved)
 +</code>
  
-==Parameters== +===== Parameters =====
-;CodePage (USHORT) - input: Code page identifier word that has one of the following values: +
-::437  IBM PC US 437 code page +
-::850  Multilingual code page +
-::860  Portuguese code page +
-::863  Canadian-French code page +
-::865  Nordic code page. +
-;Reserved (USHORT) - input: Reserved must be set to zero.+
  
-==Return Code== +  * CodePage (USHORT) - input: Code page identifier word that has one of the following values: 
-;rc (USHORT) - return:Return code descriptions are: +    * 437  IBM PC US 437 code page 
-* 0 NO_ERROR +    * 850  Multilingual code page 
-* 5 ERROR_ACCESS_DENIED +    * 860  Portuguese code page 
-* 13 ERROR_INVALID_DATA +    * 863  Canadian-French code page 
-*472 ERROR_INVALID_CODE_PAGE +    * 865  Nordic code page. 
-*482 ERROR_CP_SWITCH_INCOMPLETE+  * Reserved (USHORT) - input: Reserved must be set to zero. 
 + 
 +===== Return Code ===== 
 + 
 +rc (USHORT) - return:Return code descriptions are: 
 + 
 +  * 0 NO_ERROR 
 +  * 5 ERROR_ACCESS_DENIED 
 +  * 13 ERROR_INVALID_DATA 
 +  *472 ERROR_INVALID_CODE_PAGE 
 +  *482 ERROR_CP_SWITCH_INCOMPLETE 
 + 
 +===== Remarks =====
  
-==Remarks== 
 DosSetCp allows a program to set its code page. See CONFIG.SYS and the CODEPAGE command for preparing code pages for the system. The first code page specified in the CODEPAGE command is the default system code page. The session code page of a new session is set to the default system code page. A session's code page can be changed by the user with the CHCP command at the command prompt. The process code page of a new program started from a session command prompt is set to that session's code page. DosSetCp allows a program to set its code page. See CONFIG.SYS and the CODEPAGE command for preparing code pages for the system. The first code page specified in the CODEPAGE command is the default system code page. The session code page of a new session is set to the default system code page. A session's code page can be changed by the user with the CHCP command at the command prompt. The process code page of a new program started from a session command prompt is set to that session's code page.
  
Line 30: Line 38:
 DosSetCp also sets, in the session to which the calling process belongs, the code page for the session's default logical keyboard and automatically flushes the keyboard buffer. It also sets the display code page for the session's logical display. This setting of the code page for the session's default logical keyboard and display overrides any previous setting by DosSetCp, [[DosSetProcCp]], [[KbdSetCp]], and [[VioSetCp]] by any process in the same session. DosSetCp also sets, in the session to which the calling process belongs, the code page for the session's default logical keyboard and automatically flushes the keyboard buffer. It also sets the display code page for the session's logical display. This setting of the code page for the session's default logical keyboard and display overrides any previous setting by DosSetCp, [[DosSetProcCp]], [[KbdSetCp]], and [[VioSetCp]] by any process in the same session.
  
-==Bindings== +===== Bindings ===== 
-===C=== + 
-<PRE>+====C==== 
 +<code c>
 #define INCL_DOSNLS #define INCL_DOSNLS
  
Line 41: Line 50:
  
 USHORT  rc;            /* return code */ USHORT  rc;            /* return code */
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE>+<code asm>
 EXTRN  DosSetCp:FAR EXTRN  DosSetCp:FAR
 INCL_DOSNLS         EQU 1 INCL_DOSNLS         EQU 1
Line 53: Line 62:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
 {{page>en:templates:fapi}} {{page>en:templates:fapi}}