DosSetProcCp: Difference between revisions
m Ak120 moved page OS2 API:CPI:LEGACY:DosSetProcCp to DosSetProcCp |
mNo edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This call allows a process to set its code page. | This call allows a process to set its code page. | ||
==Syntax== | ==Syntax== | ||
DosSetProcCp (CodePage, Reserved) | |||
DosSetProcCp | |||
==Parameters== | ==Parameters== | ||
; CodePage (USHORT) - input : | ;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== | ==Return Code== | ||
;rc (USHORT) - return:Return code description is: | |||
*0 NO_ERROR | |||
Return code description is: | *472 ERROR_INVALID_CODEPAGE | ||
* 0 | |||
* 472 | |||
==Remarks== | ==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. | 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]]. | ||
== | ==Bindings== | ||
=== C | ===C=== | ||
<PRE> | <PRE> | ||
#define INCL_DOSNLS | #define INCL_DOSNLS | ||
Line 41: | Line 28: | ||
USHORT rc = DosSetProcCp(CodePage, Reserved); | USHORT rc = DosSetProcCp(CodePage, Reserved); | ||
USHORT | USHORT CodePage; /* Code page identifier */ | ||
USHORT | USHORT 0; /* Reserved, set to zero */ | ||
USHORT | USHORT rc; /* return code */ | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN DosSetProcCp:FAR | EXTRN DosSetProcCp:FAR | ||
Line 57: | Line 44: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos16]] |
Latest revision as of 07:56, 26 January 2020
This call allows a process to set its code page.
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.
Bindings
C
#define INCL_DOSNLS USHORT rc = DosSetProcCp(CodePage, Reserved); USHORT CodePage; /* Code page identifier */ USHORT 0; /* Reserved, set to zero */ USHORT rc; /* return code */
MASM
EXTRN DosSetProcCp:FAR INCL_DOSNLS EQU 1 PUSH WORD CodePage ;Code page identifier PUSH WORD 0 ;Reserved (must be zero) CALL DosSetProcCp Returns WORD