no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:doscasemap [2018/08/31 01:51] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | This call performs case mapping on a string of binary values that represent ASCII characters. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ;Length (USHORT) - input : Length of the string of binary values to be case mapped. | ||
+ | ;Country (PCOUNTRYCODE) - input/ | ||
+ | :country (USHORT) : Country code identifier is a binary value of the selected country code. 0 is the default country code. | ||
+ | :codepage (USHORT) : Code page identifier is a binary value of the selected code page. 0 is the code page of the current process. | ||
+ | ; BinaryString (PCHAR) - input/ | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | * 0 NO_ERROR | ||
+ | * 396 ERROR_NLS_NO_COUNTRY_FILE | ||
+ | * 397 ERROR_NLS_OPEN_FAILED | ||
+ | * 398 ERROR_NO_COUNTRY_OR_CODEPAGE | ||
+ | * 399 ERROR_NLS_TABLE_TRUNCATED | ||
+ | |||
+ | ==Remarks== | ||
+ | DosCaseMap is mainly used to map a lower case character string to an upper case character string. Unless the user replaces the country information file, DosCaseMap only does the conversion from lower case to upper case. | ||
+ | |||
+ | The case map information is taken from the country information file. See the COUNTRY statement in the '' | ||
+ | |||
+ | If countrycode is 0, the case mapping is performed using the information for the country specified in the COUNTRY statement in CONFIG.SYS. | ||
+ | |||
+ | If countrycode is not 0, the case mapping is performed using the information for that country. | ||
+ | |||
+ | If the code page identifier is 0, the case mapping is performed using the information for the current process code page. Refer to [[DosSetCp]] and the CHCP command in the '' | ||
+ | |||
+ | The returned country dependent information may be for the default country and current process code page or for a specific country and code page. | ||
+ | |||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | typedef struct _COUNTRYCODE { /* ctryc */ | ||
+ | |||
+ | USHORT country; | ||
+ | USHORT codepage; | ||
+ | |||
+ | } COUNTRYCODE; | ||
+ | |||
+ | #define INCL_DOSNLS | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | PCOUNTRYCODE | ||
+ | PCHAR BinaryString; | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | COUNTRYCODE struc | ||
+ | |||
+ | ctryc_country | ||
+ | ctryc_codepage | ||
+ | |||
+ | COUNTRYCODE ends | ||
+ | |||
+ | EXTRN DosCaseMap: | ||
+ | INCL_DOSNLS | ||
+ | |||
+ | PUSH | ||
+ | PUSH@ OTHER | ||
+ | PUSH@ OTHER | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||
+ | |||
+ | ==Example Code== | ||
+ | This example case maps a string for the default country and code page 850. | ||
+ | <PRE> | ||
+ | #define INCL_DOSNLS | ||
+ | |||
+ | #define CURRENT_COUNTRY 0 | ||
+ | #define NLS_CODEPAGE 850 | ||
+ | |||
+ | COUNTRYCODE Country; | ||
+ | CHAR BinString[30]; | ||
+ | USHORT | ||
+ | |||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | rc = DosCaseMap(sizeof(BinString), | ||
+ | & | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== Note ====== | ||
+ | |||
+ | Text based on [[http:// | ||
+ | |||
+ | {{page> | ||