Here is full example for Delphi 7.
unit Main;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
type
  _cpinfoex = record
    MaxCharSize: UINT; { max length (bytes) of a char }
    DefaultChar: array[0..MAX_DEFAULTCHAR - 1] of Byte; { default character }
    LeadByte: array[0..MAX_LEADBYTES - 1] of Byte; { lead byte ranges }
    UnicodeDefaultChar : WCHAR;
    CodePage : UINT;
    CodePageName : array[0..MAX_PATH] of char;
  end;
  TCPInfoEx = _cpinfoex;
  {$EXTERNALSYM CPINFOEX}
  CPINFOEX = _cpinfoex;
  {$EXTERNALSYM GetCPInfoEx}
  TForm1 = class(TForm)
    procedure FormShow(Sender: TObject);
  private
    procedure Check;
  public
  end;
  function GetCPInfoEx(CodePage: UINT; dwFlags : DWORD; var lpCPInfoEx: TCPInfoEx): BOOL; stdcall;
  function GetCPInfoEx; external kernel32 name 'GetCPInfoExA';
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Check;
var
 v_CPInfoEx : TCPInfoEx;
 v_CD : Cardinal;
 v_CharsetInfo : TCharSetInfo;
 v_CSN,
 v_CodePageName,
 v_s, v_info : String;
 v_i : Integer;
begin
 If GetCPInfoEx(CP_ACP, 0, v_CPInfoEx) then
  begin
    v_info := 'CodePage: '+IntToStr(v_CPInfoEx.CodePage)+#13;
    v_CodePageName := '';
    v_i := 0;
    repeat
      v_CodePageName := v_CodePageName + v_CPInfoEx.CodePageName[v_i];
      inc(v_i);
    until v_CPInfoEx.CodePageName[v_i] = #0;
    v_info := v_info + 'CodePageName: '+v_CodePageName+#10#13;
    v_info := v_info + 'MaxCharSize: '+IntToStr(v_CPInfoEx.MaxCharSize)+' bytes.'+#13;
    v_s := '';
    for v_i := 0 to MAX_DEFAULTCHAR - 1 do
      v_s := v_s + IntToStr(v_CPInfoEx.DefaultChar[v_i])+' ';
    v_info := v_info + 'DefaultChar: '+v_s+#13;
    v_s := '';
    for v_i := 0 to MAX_LEADBYTES - 1 - 1 do
      v_s := v_s + IntToStr(v_CPInfoEx.LeadByte[v_i])+' ';
    v_info := v_info + 'LeadByte: '+v_s+#13;
    v_info := v_info + 'UnicodeDefaultChar: '+v_CPInfoEx.UnicodeDefaultChar;
    ShowMessage(v_info);
  end;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
  Check;
end;
end.