Package: Win32

Dependencies

with Interfaces;

with Interfaces.C;

with Interfaces.C.Strings;

with System;

Description

**************************************************************

Header

package Win32 is
 

Known child units

Win32.Utils(package)
Win32.Winbase(package)
Win32.Windef(package)
Win32.Winnt(package)

Type Summary

Bits1
Bits10
Bits11
Bits12
Bits13
Bits14
Bits15
Bits16
Bits17
Bits18
Bits19
Bits2
Bits20
Bits21
Bits22
Bits23
Bits24
Bits25
Bits26
Bits27
Bits28
Bits29
Bits3
Bits30
Bits31
Bits4
Bits5
Bits6
Bits7
Bits8
Bits9
BOOL derived from INT
BYTE derived from unsigned_char
BYTE_Array
CHAR_Array
DWORDLONG
INT_Array
LONG_Array
LONGLONG
PBOOL
PBYTE
PCBYTE
PCCH
PCDWORD
PCDWORDLONG
PCHAR
PCINT
PCLONG
PCLONGLONG
PCSHORT
PCUCHAR
PCUINT
PCWCH
PCWORD
PDOUBLE
PDWORDLONG
PFLOAT
PINT
PLONG
PLONGLONG
PSHORT
PUCHAR
PUINT
PULONG
PUSHORT
PVOID_Array
PWCH
PWORD derived from PUSHORT
SHORT_Array
String_Vector
String_Vector_Access
TCHAR derived from CHAR
UCHAR_Array
UINT_Array
ULONG_Array
VOID
WCHAR_Array
WORD_Array

Constants and Named Numbers

ANYSIZE_ARRAY : constant := 0;
winnt.h :26
FALSE : constant := 0;
windef.h
Nul : constant CHAR := CHAR'First;
TRUE : constant := 1;
windef.h
Wide_Nul : constant WCHAR := WCHAR'First;

Other Items:

pragma Linker_Options ("-lwin32ada");

pragma Linker_Options ("-luser32");

pragma Linker_Options ("-lgdi32");

pragma Linker_Options ("-lcomdlg32");

type    VOID    is null record;
be converted to another pointer to be useful

subtype PVOID   is System.Address;
winnt.h

subtype LPVOID  is PVOID;
windef.h

subtype PCVOID  is PVOID;

subtype LPCVOID is PCVOID;
windef.h

type    PVOID_Array is array (Natural range <>) of aliased PVOID;
rpcproxy.h

subtype CHAR       is Interfaces.C.char;
8 bit signed chars winnt.h

type    PCHAR      is access all CHAR;
winnt.h

subtype LPCH       is PCHAR;
winnt.h

subtype PCH        is PCHAR;
winnt.h

subtype NPSTR      is PCHAR;
winnt.h

subtype LPSTR      is PCHAR;
winnt.h

subtype PSTR       is PCHAR;
winnt.h

subtype PSZ        is PCHAR;
windef.h

type    PCCH       is access constant CHAR;
winnt.h

subtype PCCHAR     is PCCH;
rpcproxy.h

subtype LPCCH      is PCCH;
winnt.h

subtype LPCSTR     is PCCH;
winnt.h

subtype PCSTR      is PCCH;
winnt.h

type    CHAR_Array is array (Natural range <>) of aliased CHAR;

type    TCHAR      is new CHAR;
tchar.h :409

subtype UCHAR       is Interfaces.C.unsigned_char;
8 bit unsigned chars windef.h

type    BYTE        is new Interfaces.C.unsigned_char;
windef.h

type    PBYTE       is access all BYTE;
windef.h

subtype LPBYTE      is PBYTE;
windef.h

type    PCBYTE      is access constant BYTE;

type    PCUCHAR     is access constant UCHAR;
rpcndr.h

type    PUCHAR      is access all UCHAR;
windef.h

type    BYTE_Array  is array (Natural range <>) of aliased BYTE;

type    UCHAR_Array is array (Natural range <>) of aliased UCHAR;

subtype Wchar_T     is Interfaces.C.wchar_t;
16 bit wide chars ctype.h

subtype WCHAR       is Wchar_T;
winnt.h

type    PWCH        is access all WCHAR;
winnt.h

subtype LPWCH       is PWCH;
winnt.h

subtype PWCHAR      is PWCH;
winnt.h

subtype NWPSTR      is PWCH;
winnt.h

subtype LPWSTR      is PWCH;
winnt.h

subtype PWSTR       is PWCH;
winnt.h

type    PCWCH       is access constant WCHAR;
winnt.h

subtype LPCWCH      is PCWCH;
winnt.h

subtype PCWSTR      is PCWCH;
winnt.h

subtype LPCWSTR     is PCWCH;
winnt.h

type    WCHAR_Array is array (Natural range <>) of aliased WCHAR;

subtype SHORT       is Interfaces.C.short;
16 bit signed integers winnt.h

type    PSHORT      is access all SHORT;
windef.h

type    PCSHORT     is access constant SHORT;

type    SHORT_Array is array (Natural range <>) of aliased SHORT;

subtype USHORT     is Interfaces.C.unsigned_short;
16 bit unsigned integers windef.h

subtype WORD       is USHORT;
windef.h

type    PUSHORT    is access all USHORT;
windef.h

type    PWORD      is new PUSHORT;
windef.h

type    PCWORD     is access constant WORD;

subtype LPWORD     is PWORD;
windef.h

type    WORD_Array is array (Natural range <>) of aliased WORD;

subtype INT       is Interfaces.C.int;
"int" types, signed, 32 bits on Intel windef.h

type    BOOL      is new INT;
windef.h

type    PBOOL     is access all BOOL;
windef.h

subtype LPBOOL    is PBOOL;
windef.h

type    PINT      is access all INT;
windef.h

subtype LPINT     is PINT;
windef.h

type    PCINT     is access constant INT;

type    INT_Array is array (Natural range <>) of aliased INT;

subtype UINT       is Interfaces.C.unsigned;
"unsigned" or "unsigned int" types, unsigned, 32 bits on Intel windef.h

subtype WPARAM     is UINT;
windef.h

type    PUINT      is access all UINT;
windef.h

type    PCUINT     is access constant UINT;

type    UINT_Array is array (Natural range <>) of aliased UINT;

subtype Size_T     is Interfaces.C.size_t;

subtype LONG       is Interfaces.C.long;
"long" 32 bit signed integers winnt.h

subtype LPARAM     is LONG;
windef.h

subtype LRESULT    is LONG;
windef.h

type    PLONG      is access all LONG;

subtype LPLONG     is PLONG;
windef.h

type    PCLONG     is access constant LONG;

type    LONG_Array is array (Natural range <>) of aliased LONG;

subtype ULONG       is Interfaces.C.unsigned_long;
"unsigned long" 32 bit unsigned integers windef.h

subtype DWORD       is ULONG;
windef.h

type    PULONG      is access all ULONG;
windef.h

subtype PDWORD      is PULONG;
windef.h

subtype LPDWORD     is PDWORD;
windef.h

type    PCDWORD     is access constant DWORD;

type    ULONG_Array is array (Natural range <>) of aliased ULONG;

subtype DWORD_Array is ULONG_Array;

subtype FLOAT  is Interfaces.C.C_float;
builtin C "float", 32 bits on Intel windef.h

type    PFLOAT is access all FLOAT;
windef.h

subtype DOUBLE  is Interfaces.C.double;
builtin C "double", also 64 bits on Intel

type    PDOUBLE is access all DOUBLE;

type LONGLONG is private;
64 bit signed integer

type PLONGLONG is access all LONGLONG;
winnt.h

type PCLONGLONG is access constant LONGLONG;

type DWORDLONG is private;
64 bit unsigned integer

type PDWORDLONG is access all DWORDLONG;
winnt.h

type PCDWORDLONG is access constant DWORDLONG;

function To_Chars_Ptr (STR : PSTR) return Interfaces.C.Strings.chars_ptr;

function To_Chars_Ptr (STR : PCSTR) return Interfaces.C.Strings.chars_ptr;

function To_PSTR (CP : Interfaces.C.Strings.chars_ptr) return PSTR;

function To_PCSTR (CP : Interfaces.C.Strings.chars_ptr) return PCSTR;

function To_C (S : CHAR_Array) return Interfaces.C.char_array;

function To_Win (S : Interfaces.C.char_array) return CHAR_Array;

function To_Win (S : Interfaces.C.wchar_array) return WCHAR_Array;

function Addr (S : String) return PSTR;

function Addr (S : String) return PCSTR;

function Addr (S : Wide_String) return PWSTR;

function Addr (S : Wide_String) return PCWSTR;

function Addr (S : CHAR_Array) return PSTR;

function Addr (S : CHAR_Array) return PCSTR;

function Addr (S : WCHAR_Array) return PWSTR;

function Addr (S : WCHAR_Array) return PCWSTR;

function Cat (Left, Right : String) return String;

function Cat (Left, Right : Wide_String) return Wide_String;

function Cat (Left, Right : CHAR_Array) return CHAR_Array;

function Cat (Left, Right : WCHAR_Array) return WCHAR_Array;

type String_Vector is array (0 .. Win32.ANYSIZE_ARRAY) of aliased

  Win32.PSTR;
********************************************************

type String_Vector_Access is access all String_Vector;

type Bits1  is range 0 .. 2**1-1;
for Bits1'Size use 1;
*******************************************

type Bits2  is range 0 .. 2**2-1;
for Bits2'Size use 2;

type Bits3  is range 0 .. 2**3-1;
for Bits3'Size use 3;

type Bits4  is range 0 .. 2**4-1;
for Bits4'Size use 4;

type Bits5  is range 0 .. 2**5-1;
for Bits5'Size use 5;

type Bits6  is range 0 .. 2**6-1;
for Bits6'Size use 6;

type Bits7  is range 0 .. 2**7-1;
for Bits7'Size use 7;

type Bits8  is range 0 .. 2**8-1;
for Bits8'Size use 8;

type Bits9  is range 0 .. 2**9-1;
for Bits9'Size use 9;

type Bits10 is range 0 .. 2**10-1;
for Bits10'Size use 10;

type Bits11 is range 0 .. 2**11-1;
for Bits11'Size use 11;

type Bits12 is range 0 .. 2**12-1;
for Bits12'Size use 12;

type Bits13 is range 0 .. 2**13-1;
for Bits13'Size use 13;

type Bits14 is range 0 .. 2**14-1;
for Bits14'Size use 14;

type Bits15 is range 0 .. 2**15-1;
for Bits15'Size use 15;

type Bits16 is range 0 .. 2**16-1;
for Bits16'Size use 16;

type Bits17 is range 0 .. 2**17-1;
for Bits17'Size use 17;

type Bits18 is range 0 .. 2**18-1;
for Bits18'Size use 18;

type Bits19 is range 0 .. 2**19-1;
for Bits19'Size use 19;

type Bits20 is range 0 .. 2**20-1;
for Bits20'Size use 20;

type Bits21 is range 0 .. 2**21-1;
for Bits21'Size use 21;

type Bits22 is range 0 .. 2**22-1;
for Bits22'Size use 22;

type Bits23 is range 0 .. 2**23-1;
for Bits23'Size use 23;

type Bits24 is range 0 .. 2**24-1;
for Bits24'Size use 24;

type Bits25 is range 0 .. 2**25-1;
for Bits25'Size use 25;

type Bits26 is range 0 .. 2**26-1;
for Bits26'Size use 26;

type Bits27 is range 0 .. 2**27-1;
for Bits27'Size use 27;

type Bits28 is range 0 .. 2**28-1;
for Bits28'Size use 28;

type Bits29 is range 0 .. 2**29-1;
for Bits29'Size use 29;

type Bits30 is range 0 .. 2**30-1;
for Bits30'Size use 30;

type Bits31 is range 0 .. 2**31-1;
for Bits31'Size use 31;

private

   --  Implementation-defined ...
end Win32;