GetCPInfo
GetCPInfo
Functional Difference from WIN95
Unsupported parameter - CP_MACCP
Functional Difference from SBCS Open32
New
Implementation
This function gets the actual code page id for the specified parameter,
and returns the CPINFO for that code page.
───────────────────────────────────────────────────────────────
Value as Codepage parameter This function returns CPINFO
of
CP_ACP system default ANSI code page
(*1)
CP_OEMCP system default OEM code page
(*1)
Any code page id all available code pages (*2)
───────────────────────────────────────────────────────────────
Note:
- This locale item is initialized by Open32 constructor
useNLS when the process begins. These codepages are ANSI codepage
and OEM codepage in the Open32 locale table determined by the user default
Language ID. As for the user default Language ID, see the description for
ConvertDefaultLocale. Open32
checks whether those codepages are available not. As for the available
codepages, see the description for EnumSystemCodePages. If ANSI codepage
is not available, Open32 gets the active PM codepage by WinQueryCP. If
OEM codepage is not available, Open32 gets it by DosQueryCP.
- This function fails if the specified code page
is not available. As for the available codepages, see the description for
IsValidCodePage.
Here is the implementation to provide
the information; CPINFO. These information are determined by Open32 constructor
useNLS.
───────────────────────────────────────────────────────────────
Members in CPINFO Values in CPINFO
MaxCharSize 1=if SBCS codepage, 2=if DBCS
codepage (*1)
DefaultChar '3F'x (*2)
LeadByte Array Generated from the output of
UniQueryUconvObject
───────────────────────────────────────────────────────────────
Note:
- For the codepage of the user default language
ID, it is determined when the process begins. For the other codepages,
it is determined on demand. Open32 gets the DBCS lead byte array of the
specified codepage by UniQueryUconvObject against the UCONV object of that
codepage. Codepage is recognized as DBCS codepage, if its LeadByte array
is not NULL. Otherwise it is SBCS codepage.
- Open32 always sets '3F'x as the DefaultChar.
It is from the result the CPINFO of all code pages installed in WIN95-J.
[Back: EnumSystemLocales]
[Next: GetLocaleInfo]