WinSetCp
Appearance
This function sets the code page for a queue.
Syntax
WinSetCp(hmq, ulCodePage)
Parameters
- hmq (HMQ) - Input
- Message-queue handle.
- ulCodePage (ULONG) - Input
- Code page.
- Either of the two ASCII code pages specified in CONFIG.SYS can be selected.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
The following is the list of valid code pages:
Country Code Page Canadian-French 863 Desktop Publishing 1004 Iceland 861 Latin 1 Multilingual 850 Latin 2 Multilingual 852 Nordic 865 Portuguese 860 Turkey 857 U.S. (IBM PC) 437
Code page 1004 is compatible with Microsoft** Windows**. The following EBCDIC code pages, based on character set 697, are also available for output:
Country Code Page Austrian/German 273 Belgian 500 Brazil 037 Czechoslovakia 870 Danish/Norwegian 277 Finnish/Swedish 278 French 297 Hungary 870 Iceland 871 International 500 Italian 280 Poland 870 Portuguese 037 Spanish 284 Turkey 1026 U.K.-English 285 U.S.-English 037 Yugoslavia 870
Code pages 274 (Belgian) and 282 (Portuguese) can be used to provide access to old data.
Errors
Possible returns from WinGetLastError:
- PMERR_INVALID_HMQ (0x1002) An invalid message-queue handle was specified.
- PMERR_RESOURCE_NOT_FOUND (0x100A) The specified resource identity could not be found.
Example Code
#define INCL_WINCOUNTRY #include <OS2.H> HMQ hmq; ULONG currentCP; currentCP = WinQueryCp(hmq); if(currentCP != 850) { WinSetCp(hmq, 850); }