Jump to content

WinQueryCpList: Difference between revisions

From EDM2
Created page with "This function queries available code pages. ==Syntax==  WinQueryCpList(hab, ulcount, aulCodepage) ==Parameters== ;hab (HAB) - Input : Anchor-block handle. ;ulcount (ULONG) - Input : Maximum number of code pages returned. ;aulCodepage (PULONG) - Output : Code page list. : An array of {{hp1|ulcount}} elements, that contains a list of code pages available to the program. : For more information about code pages, see . ;ulTotCount (ULONG) - Returns : Total..."
 
No edit summary
 
Line 11: Line 11:
;aulCodepage ([[PULONG]]) - Output
;aulCodepage ([[PULONG]]) - Output
: Code page list.
: Code page list.
: An array of {{hp1|ulcount}} elements, that contains a list of code pages available to the program.
: An array of ulcount elements, that contains a list of code pages available to the program.
: For more information about code pages, see .
: For more information about code pages, see .
;ulTotCount ([[ULONG]]) - Returns
;ulTotCount ([[ULONG]]) - Returns

Latest revision as of 17:25, 9 April 2025

This function queries available code pages.

Syntax

 WinQueryCpList(hab, ulcount, aulCodepage)

Parameters

hab (HAB) - Input
Anchor-block handle.
ulcount (ULONG) - Input
Maximum number of code pages returned.
aulCodepage (PULONG) - Output
Code page list.
An array of ulcount elements, that contains a list of code pages available to the program.
For more information about code pages, see .
ulTotCount (ULONG) - Returns
Total number of code pages available.
0
An error occurred
Other
Total number of code pages available.

Errors

Possible returns from WinGetLastError:

  • PMERR_PARAMETER_OUT_OF_RANGE (0x1003) The value of a parameter was not within the defined valid range for that parameter.

Example Code

#define INCL_WINCOUNTRY
#include <OS2.H>
#define maxcount 8
HAB hab;
ULONG  aulCodepage[maxcount];
ULONG  ulTotalCount;


ulTotalCount = WinQueryCpList(hab,
               (ULONG)maxcount,
               (PULONG) aulCodepage);

Related Functions