1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . W I N 3 2 . E X T --
9 -- Copyright (C) 2009, 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 3, 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package provides the part of the low level Win32 interface which is
33 -- not supported by RTX (but supported by regular Windows platforms).
35 package System.Win32.Ext is
42 function QueryPerformanceFrequency
43 (lpFrequency : access LARGE_INTEGER) return Win32.BOOL;
45 (Stdcall, QueryPerformanceFrequency, "QueryPerformanceFrequency");
51 function SetThreadIdealProcessor
53 dwIdealProcessor : ProcessorId) return DWORD;
54 pragma Import (Stdcall, SetThreadIdealProcessor, "SetThreadIdealProcessor");
60 DTR_CONTROL_DISABLE : constant := 16#0#;
61 RTS_CONTROL_DISABLE : constant := 16#0#;
62 NOPARITY : constant := 0;
63 ODDPARITY : constant := 1;
64 EVENPARITY : constant := 2;
65 ONESTOPBIT : constant := 0;
66 TWOSTOPBITS : constant := 2;
76 fDsrSensitivity : Bits1;
77 fTXContinueOnXoff : Bits1;
83 fAbortOnError : Bits1;
98 pragma Convention (C, DCB);
101 type COMMTIMEOUTS is record
102 ReadIntervalTimeout : DWORD;
103 ReadTotalTimeoutMultiplier : DWORD;
104 ReadTotalTimeoutConstant : DWORD;
105 WriteTotalTimeoutMultiplier : DWORD;
106 WriteTotalTimeoutConstant : DWORD;
108 pragma Convention (C, COMMTIMEOUTS);
110 function GetCommState
112 lpDCB : access DCB) return BOOL;
113 pragma Import (Stdcall, GetCommState, "GetCommState");
115 function SetCommState
117 lpDCB : access DCB) return BOOL;
118 pragma Import (Stdcall, SetCommState, "SetCommState");
120 function SetCommTimeouts
122 lpCommTimeouts : access COMMTIMEOUTS) return BOOL;
123 pragma Import (Stdcall, SetCommTimeouts, "SetCommTimeouts");
125 end System.Win32.Ext;