1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . W I N 3 2 . E X T --
9 -- Copyright (C) 2008, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 -- This package provides the part of the low level Win32 interface which is
35 -- not supported by RTX (but supported by regular Windows platforms).
37 package System.Win32.Ext is
44 function QueryPerformanceFrequency
45 (lpFrequency : access LARGE_INTEGER) return Win32.BOOL;
47 (Stdcall, QueryPerformanceFrequency, "QueryPerformanceFrequency");
53 function SetThreadIdealProcessor
55 dwIdealProcessor : ProcessorId) return DWORD;
56 pragma Import (Stdcall, SetThreadIdealProcessor, "SetThreadIdealProcessor");
62 DTR_CONTROL_DISABLE : constant := 16#0#;
63 RTS_CONTROL_DISABLE : constant := 16#0#;
64 NOPARITY : constant := 0;
65 ODDPARITY : constant := 1;
66 EVENPARITY : constant := 2;
67 ONESTOPBIT : constant := 0;
68 TWOSTOPBITS : constant := 2;
78 fDsrSensitivity : Bits1;
79 fTXContinueOnXoff : Bits1;
85 fAbortOnError : Bits1;
100 pragma Convention (C, DCB);
103 type COMMTIMEOUTS is record
104 ReadIntervalTimeout : DWORD;
105 ReadTotalTimeoutMultiplier : DWORD;
106 ReadTotalTimeoutConstant : DWORD;
107 WriteTotalTimeoutMultiplier : DWORD;
108 WriteTotalTimeoutConstant : DWORD;
110 pragma Convention (C, COMMTIMEOUTS);
112 function GetCommState
114 lpDCB : access DCB) return BOOL;
115 pragma Import (Stdcall, GetCommState, "GetCommState");
117 function SetCommState
119 lpDCB : access DCB) return BOOL;
120 pragma Import (Stdcall, SetCommState, "SetCommState");
122 function SetCommTimeouts
124 lpCommTimeouts : access COMMTIMEOUTS) return BOOL;
125 pragma Import (Stdcall, SetCommTimeouts, "SetCommTimeouts");
127 end System.Win32.Ext;