[Toc][Index]

DosGetCp


Bindings:  C, MASM 

This call allows a process to query the current process code page and the 
prepared system code pages. 
 DosGetCp    (Length, CodePageList, DataLength) 
 
 Length (USHORT) - input 
    Length, in bytes, of CodePageList.  This length should be at least 2 
    bytes. If the length is less than the bytes needed to return all the 
    prepared system code pages than the returned CodePageList is 
    truncated. 
 CodePageList (PUSHORT) - output 
    Address of the list of available system code pages. The format of the 
    information returned in this list is: 
    Word      Description 
    1         Current code page identifier 
    2         The first prepared code page 
    3         The second prepared code page 
    N         Other prepared system code pages. 
 DataLength (PUSHORT) - output 
    Address of the length, in bytes, of the returned data. 
 rc (USHORT) - return 
    Return code descriptions are: 
    0         NO_ERROR 
    473       ERROR_CPLIST_TOO_SMALL 
 
 Remarks 
 If the process code page identifier was previously set by DosSetCp or 
 inherited by a process, it is returned to the caller. 
 An input list size (length) of two bytes returns only the current process 
 code page identifier.  If CodePageList length is too small to hold all 
 the available information, then as much information as possible is 
 provided in the available space and ERROR_CPLIST_TOO_SMALL is returned. 
 If no codepages were prepared with the CODEPAGE command, a length of two 
 and current codepage identifier value of zero is returned. 
 
 Family API Considerations 
 Some options operate differently in the DOS mode than in OS/2 mode. 
  Therefore, the following restriction applies to DosGetCp when coding for 
 the DOS mode: 
 The current process code page, and no more than one prepared system code 
 page, is returned. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs