Jump to content

DosSetProcCp: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
[[image:legacy.png]]
This call allows a process to set its code page.
This function has been renamed to "[[OS2_API:CPI:DosSetProcessCp|DosSetProcessCp]]". [https://books.google.com.ec/books?id=u7WbsmbttwYC&pg=PT372&lpg=PT372&dq#v=onepage&q&f=false]
 


==Description==
This function has been renamed to "[[DosSetProcessCp]]".
This call allows a process to set its code page.


==Syntax==
==Syntax==
<PRE>
  DosSetProcCp (CodePage, Reserved)
  DosSetProcCp


    (CodePage, Reserved)
</PRE>
==Parameters==
==Parameters==
; CodePage (USHORT) - input :  Code page identifier word that has one of the following values:
; 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.


    Value        Definition
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==
==Return Code==
  rc (USHORT) - return
  rc (USHORT) - return
Return code description is:
Return code description is:
 
* 0          NO_ERROR
* 0          NO_ERROR  
* 472        ERROR_INVALID_CODEPAGE
* 472        ERROR_INVALID_CODEPAGE  


==Remarks==
==Remarks==
Line 60: Line 50:
*  
*  


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

Revision as of 15:59, 18 February 2017

This call allows a process to set its code page.

This function has been renamed to "DosSetProcessCp".

Syntax

DosSetProcCp (CodePage, Reserved)

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

rc (USHORT) - return

Return code description is:

  • 0 NO_ERROR
  • 472 ERROR_INVALID_CODEPAGE

Remarks

DosSetProcCp sets the process code page of the calling process. The code page of a process is used in the following ways. First, the printer code page is set to the process code page through the file system and printer spooler when the process makes an open printer request. Calling DosSetProcCp does not affect the code page of a printer opened prior to the call and does not affect the code page of a printer opened by another process. Second, country dependent information, by default, is retrieved encoded in the code page of the calling process. And third, a newly created process inherits its process code page from its parent process. DosSetProcCp does not affect the display or keyboard code page. Also see DosSetCp.

Example Code

C Binding

#define INCL_DOSNLS

USHORT  rc = DosSetProcCp(CodePage, Reserved);

USHORT           CodePage;      /* Code page identifier */
USHORT           0;             /* Reserved, set to zero */

USHORT           rc;            /* return code */

MASM Binding

EXTRN  DosSetProcCp:FAR
INCL_DOSNLS         EQU 1

PUSH   WORD    CodePage      ;Code page identifier
PUSH   WORD    0             ;Reserved (must be zero)
CALL   DosSetProcCp

Returns WORD

Related Functions