annotate gcc/ada/libgnat/s-win32.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT RUN-TIME COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S Y S T E M . W I N 3 2 --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 -- Copyright (C) 2008-2018, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
17 -- --
kono
parents:
diff changeset
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
19 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
20 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- You should have received a copy of the GNU General Public License and --
kono
parents:
diff changeset
23 -- a copy of the GCC Runtime Library Exception along with this program; --
kono
parents:
diff changeset
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
kono
parents:
diff changeset
25 -- <http://www.gnu.org/licenses/>. --
kono
parents:
diff changeset
26 -- --
kono
parents:
diff changeset
27 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
29 -- --
kono
parents:
diff changeset
30 ------------------------------------------------------------------------------
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 -- This package plus its child provide the low level interface to the Win32
kono
parents:
diff changeset
33 -- API. The core part of the Win32 API (common to RTX and Win32) is in this
kono
parents:
diff changeset
34 -- package, and an additional part of the Win32 API which is not supported by
kono
parents:
diff changeset
35 -- RTX is in package System.Win32.Ext.
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 with Interfaces.C;
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 package System.Win32 is
kono
parents:
diff changeset
40 pragma Pure;
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 -------------------
kono
parents:
diff changeset
43 -- General Types --
kono
parents:
diff changeset
44 -------------------
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 -- The LARGE_INTEGER type is actually a fixed point type
kono
parents:
diff changeset
47 -- that only can represent integers. The reason for this is
kono
parents:
diff changeset
48 -- easier conversion to Duration or other fixed point types.
kono
parents:
diff changeset
49 -- (See System.OS_Primitives.Clock, mingw and rtx versions.)
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 type LARGE_INTEGER is delta 1.0 range -2.0**63 .. 2.0**63 - 1.0;
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 subtype PVOID is Address;
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 type HANDLE is new Interfaces.C.ptrdiff_t;
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 INVALID_HANDLE_VALUE : constant HANDLE := -1;
kono
parents:
diff changeset
58 INVALID_FILE_SIZE : constant := 16#FFFFFFFF#;
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 type DWORD is new Interfaces.C.unsigned_long;
kono
parents:
diff changeset
61 type WORD is new Interfaces.C.unsigned_short;
kono
parents:
diff changeset
62 type BYTE is new Interfaces.C.unsigned_char;
kono
parents:
diff changeset
63 type LONG is new Interfaces.C.long;
kono
parents:
diff changeset
64 type CHAR is new Interfaces.C.char;
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 type BOOL is new Interfaces.C.int;
kono
parents:
diff changeset
67 for BOOL'Size use Interfaces.C.int'Size;
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 type Bits1 is range 0 .. 2 ** 1 - 1;
kono
parents:
diff changeset
70 type Bits2 is range 0 .. 2 ** 2 - 1;
kono
parents:
diff changeset
71 type Bits17 is range 0 .. 2 ** 17 - 1;
kono
parents:
diff changeset
72 for Bits1'Size use 1;
kono
parents:
diff changeset
73 for Bits2'Size use 2;
kono
parents:
diff changeset
74 for Bits17'Size use 17;
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 -- Note that the following clashes with standard names are to stay
kono
parents:
diff changeset
77 -- compatible with the historical choice of following the C names.
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 pragma Warnings (Off);
kono
parents:
diff changeset
80 FALSE : constant := 0;
kono
parents:
diff changeset
81 TRUE : constant := 1;
kono
parents:
diff changeset
82 pragma Warnings (On);
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 function GetLastError return DWORD;
kono
parents:
diff changeset
85 pragma Import (Stdcall, GetLastError, "GetLastError");
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 -----------
kono
parents:
diff changeset
88 -- Files --
kono
parents:
diff changeset
89 -----------
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 CP_UTF8 : constant := 65001;
kono
parents:
diff changeset
92 CP_ACP : constant := 0;
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 GENERIC_READ : constant := 16#80000000#;
kono
parents:
diff changeset
95 GENERIC_WRITE : constant := 16#40000000#;
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 CREATE_NEW : constant := 1;
kono
parents:
diff changeset
98 CREATE_ALWAYS : constant := 2;
kono
parents:
diff changeset
99 OPEN_EXISTING : constant := 3;
kono
parents:
diff changeset
100 OPEN_ALWAYS : constant := 4;
kono
parents:
diff changeset
101 TRUNCATE_EXISTING : constant := 5;
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 FILE_SHARE_DELETE : constant := 16#00000004#;
kono
parents:
diff changeset
104 FILE_SHARE_READ : constant := 16#00000001#;
kono
parents:
diff changeset
105 FILE_SHARE_WRITE : constant := 16#00000002#;
kono
parents:
diff changeset
106
kono
parents:
diff changeset
107 FILE_BEGIN : constant := 0;
kono
parents:
diff changeset
108 FILE_CURRENT : constant := 1;
kono
parents:
diff changeset
109 FILE_END : constant := 2;
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 PAGE_NOACCESS : constant := 16#0001#;
kono
parents:
diff changeset
112 PAGE_READONLY : constant := 16#0002#;
kono
parents:
diff changeset
113 PAGE_READWRITE : constant := 16#0004#;
kono
parents:
diff changeset
114 PAGE_WRITECOPY : constant := 16#0008#;
kono
parents:
diff changeset
115 PAGE_EXECUTE : constant := 16#0010#;
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 FILE_MAP_ALL_ACCESS : constant := 16#F001f#;
kono
parents:
diff changeset
118 FILE_MAP_READ : constant := 4;
kono
parents:
diff changeset
119 FILE_MAP_WRITE : constant := 2;
kono
parents:
diff changeset
120 FILE_MAP_COPY : constant := 1;
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 FILE_ADD_FILE : constant := 16#0002#;
kono
parents:
diff changeset
123 FILE_ADD_SUBDIRECTORY : constant := 16#0004#;
kono
parents:
diff changeset
124 FILE_APPEND_DATA : constant := 16#0004#;
kono
parents:
diff changeset
125 FILE_CREATE_PIPE_INSTANCE : constant := 16#0004#;
kono
parents:
diff changeset
126 FILE_DELETE_CHILD : constant := 16#0040#;
kono
parents:
diff changeset
127 FILE_EXECUTE : constant := 16#0020#;
kono
parents:
diff changeset
128 FILE_LIST_DIRECTORY : constant := 16#0001#;
kono
parents:
diff changeset
129 FILE_READ_ATTRIBUTES : constant := 16#0080#;
kono
parents:
diff changeset
130 FILE_READ_DATA : constant := 16#0001#;
kono
parents:
diff changeset
131 FILE_READ_EA : constant := 16#0008#;
kono
parents:
diff changeset
132 FILE_TRAVERSE : constant := 16#0020#;
kono
parents:
diff changeset
133 FILE_WRITE_ATTRIBUTES : constant := 16#0100#;
kono
parents:
diff changeset
134 FILE_WRITE_DATA : constant := 16#0002#;
kono
parents:
diff changeset
135 FILE_WRITE_EA : constant := 16#0010#;
kono
parents:
diff changeset
136 STANDARD_RIGHTS_READ : constant := 16#20000#;
kono
parents:
diff changeset
137 STANDARD_RIGHTS_WRITE : constant := 16#20000#;
kono
parents:
diff changeset
138 SYNCHRONIZE : constant := 16#100000#;
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 FILE_ATTRIBUTE_READONLY : constant := 16#00000001#;
kono
parents:
diff changeset
141 FILE_ATTRIBUTE_HIDDEN : constant := 16#00000002#;
kono
parents:
diff changeset
142 FILE_ATTRIBUTE_SYSTEM : constant := 16#00000004#;
kono
parents:
diff changeset
143 FILE_ATTRIBUTE_DIRECTORY : constant := 16#00000010#;
kono
parents:
diff changeset
144 FILE_ATTRIBUTE_ARCHIVE : constant := 16#00000020#;
kono
parents:
diff changeset
145 FILE_ATTRIBUTE_DEVICE : constant := 16#00000040#;
kono
parents:
diff changeset
146 FILE_ATTRIBUTE_NORMAL : constant := 16#00000080#;
kono
parents:
diff changeset
147 FILE_ATTRIBUTE_TEMPORARY : constant := 16#00000100#;
kono
parents:
diff changeset
148 FILE_ATTRIBUTE_SPARSE_FILE : constant := 16#00000200#;
kono
parents:
diff changeset
149 FILE_ATTRIBUTE_REPARSE_POINT : constant := 16#00000400#;
kono
parents:
diff changeset
150 FILE_ATTRIBUTE_COMPRESSED : constant := 16#00000800#;
kono
parents:
diff changeset
151 FILE_ATTRIBUTE_OFFLINE : constant := 16#00001000#;
kono
parents:
diff changeset
152 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED : constant := 16#00002000#;
kono
parents:
diff changeset
153 FILE_ATTRIBUTE_ENCRYPTED : constant := 16#00004000#;
kono
parents:
diff changeset
154 FILE_ATTRIBUTE_VALID_FLAGS : constant := 16#00007fb7#;
kono
parents:
diff changeset
155 FILE_ATTRIBUTE_VALID_SET_FLAGS : constant := 16#000031a7#;
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS : constant := 16#00000004#;
kono
parents:
diff changeset
158
kono
parents:
diff changeset
159 type OVERLAPPED is record
kono
parents:
diff changeset
160 Internal : DWORD;
kono
parents:
diff changeset
161 InternalHigh : DWORD;
kono
parents:
diff changeset
162 Offset : DWORD;
kono
parents:
diff changeset
163 OffsetHigh : DWORD;
kono
parents:
diff changeset
164 hEvent : HANDLE;
kono
parents:
diff changeset
165 end record;
kono
parents:
diff changeset
166
kono
parents:
diff changeset
167 type SECURITY_ATTRIBUTES is record
kono
parents:
diff changeset
168 nLength : DWORD;
kono
parents:
diff changeset
169 pSecurityDescriptor : PVOID;
kono
parents:
diff changeset
170 bInheritHandle : BOOL;
kono
parents:
diff changeset
171 end record;
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 function CreateFileA
kono
parents:
diff changeset
174 (lpFileName : Address;
kono
parents:
diff changeset
175 dwDesiredAccess : DWORD;
kono
parents:
diff changeset
176 dwShareMode : DWORD;
kono
parents:
diff changeset
177 lpSecurityAttributes : access SECURITY_ATTRIBUTES;
kono
parents:
diff changeset
178 dwCreationDisposition : DWORD;
kono
parents:
diff changeset
179 dwFlagsAndAttributes : DWORD;
kono
parents:
diff changeset
180 hTemplateFile : HANDLE) return HANDLE;
kono
parents:
diff changeset
181 pragma Import (Stdcall, CreateFileA, "CreateFileA");
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 function CreateFile
kono
parents:
diff changeset
184 (lpFileName : Address;
kono
parents:
diff changeset
185 dwDesiredAccess : DWORD;
kono
parents:
diff changeset
186 dwShareMode : DWORD;
kono
parents:
diff changeset
187 lpSecurityAttributes : access SECURITY_ATTRIBUTES;
kono
parents:
diff changeset
188 dwCreationDisposition : DWORD;
kono
parents:
diff changeset
189 dwFlagsAndAttributes : DWORD;
kono
parents:
diff changeset
190 hTemplateFile : HANDLE) return HANDLE;
kono
parents:
diff changeset
191 pragma Import (Stdcall, CreateFile, "CreateFileW");
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 function GetFileSize
kono
parents:
diff changeset
194 (hFile : HANDLE;
kono
parents:
diff changeset
195 lpFileSizeHigh : access DWORD) return BOOL;
kono
parents:
diff changeset
196 pragma Import (Stdcall, GetFileSize, "GetFileSize");
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 function SetFilePointer
kono
parents:
diff changeset
199 (hFile : HANDLE;
kono
parents:
diff changeset
200 lDistanceToMove : LONG;
kono
parents:
diff changeset
201 lpDistanceToMoveHigh : access LONG;
kono
parents:
diff changeset
202 dwMoveMethod : DWORD) return DWORD;
kono
parents:
diff changeset
203 pragma Import (Stdcall, SetFilePointer, "SetFilePointer");
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 function WriteFile
kono
parents:
diff changeset
206 (hFile : HANDLE;
kono
parents:
diff changeset
207 lpBuffer : Address;
kono
parents:
diff changeset
208 nNumberOfBytesToWrite : DWORD;
kono
parents:
diff changeset
209 lpNumberOfBytesWritten : access DWORD;
kono
parents:
diff changeset
210 lpOverlapped : access OVERLAPPED) return BOOL;
kono
parents:
diff changeset
211 pragma Import (Stdcall, WriteFile, "WriteFile");
kono
parents:
diff changeset
212
kono
parents:
diff changeset
213 function ReadFile
kono
parents:
diff changeset
214 (hFile : HANDLE;
kono
parents:
diff changeset
215 lpBuffer : Address;
kono
parents:
diff changeset
216 nNumberOfBytesToRead : DWORD;
kono
parents:
diff changeset
217 lpNumberOfBytesRead : access DWORD;
kono
parents:
diff changeset
218 lpOverlapped : access OVERLAPPED) return BOOL;
kono
parents:
diff changeset
219 pragma Import (Stdcall, ReadFile, "ReadFile");
kono
parents:
diff changeset
220
kono
parents:
diff changeset
221 function CloseHandle (hObject : HANDLE) return BOOL;
kono
parents:
diff changeset
222 pragma Import (Stdcall, CloseHandle, "CloseHandle");
kono
parents:
diff changeset
223
kono
parents:
diff changeset
224 function CreateFileMapping
kono
parents:
diff changeset
225 (hFile : HANDLE;
kono
parents:
diff changeset
226 lpSecurityAttributes : access SECURITY_ATTRIBUTES;
kono
parents:
diff changeset
227 flProtect : DWORD;
kono
parents:
diff changeset
228 dwMaximumSizeHigh : DWORD;
kono
parents:
diff changeset
229 dwMaximumSizeLow : DWORD;
kono
parents:
diff changeset
230 lpName : Address) return HANDLE;
kono
parents:
diff changeset
231 pragma Import (Stdcall, CreateFileMapping, "CreateFileMappingA");
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 function MapViewOfFile
kono
parents:
diff changeset
234 (hFileMappingObject : HANDLE;
kono
parents:
diff changeset
235 dwDesiredAccess : DWORD;
kono
parents:
diff changeset
236 dwFileOffsetHigh : DWORD;
kono
parents:
diff changeset
237 dwFileOffsetLow : DWORD;
kono
parents:
diff changeset
238 dwNumberOfBytesToMap : DWORD) return System.Address;
kono
parents:
diff changeset
239 pragma Import (Stdcall, MapViewOfFile, "MapViewOfFile");
kono
parents:
diff changeset
240
kono
parents:
diff changeset
241 function UnmapViewOfFile (lpBaseAddress : System.Address) return BOOL;
kono
parents:
diff changeset
242 pragma Import (Stdcall, UnmapViewOfFile, "UnmapViewOfFile");
kono
parents:
diff changeset
243
kono
parents:
diff changeset
244 function MultiByteToWideChar
kono
parents:
diff changeset
245 (CodePage : WORD;
kono
parents:
diff changeset
246 dwFlags : DWORD;
kono
parents:
diff changeset
247 lpMultiByteStr : System.Address;
kono
parents:
diff changeset
248 cchMultiByte : WORD;
kono
parents:
diff changeset
249 lpWideCharStr : System.Address;
kono
parents:
diff changeset
250 cchWideChar : WORD) return WORD;
kono
parents:
diff changeset
251 pragma Import (Stdcall, MultiByteToWideChar, "MultiByteToWideChar");
kono
parents:
diff changeset
252
kono
parents:
diff changeset
253 ------------------------
kono
parents:
diff changeset
254 -- System Information --
kono
parents:
diff changeset
255 ------------------------
kono
parents:
diff changeset
256
kono
parents:
diff changeset
257 subtype ProcessorId is DWORD;
kono
parents:
diff changeset
258
kono
parents:
diff changeset
259 type SYSTEM_INFO is record
kono
parents:
diff changeset
260 dwOemId : DWORD;
kono
parents:
diff changeset
261 dwPageSize : DWORD;
kono
parents:
diff changeset
262 lpMinimumApplicationAddress : PVOID;
kono
parents:
diff changeset
263 lpMaximumApplicationAddress : PVOID;
kono
parents:
diff changeset
264 dwActiveProcessorMask : DWORD;
kono
parents:
diff changeset
265 dwNumberOfProcessors : DWORD;
kono
parents:
diff changeset
266 dwProcessorType : DWORD;
kono
parents:
diff changeset
267 dwAllocationGranularity : DWORD;
kono
parents:
diff changeset
268 dwReserved : DWORD;
kono
parents:
diff changeset
269 end record;
kono
parents:
diff changeset
270
kono
parents:
diff changeset
271 procedure GetSystemInfo (SI : access SYSTEM_INFO);
kono
parents:
diff changeset
272 pragma Import (Stdcall, GetSystemInfo, "GetSystemInfo");
kono
parents:
diff changeset
273
kono
parents:
diff changeset
274 ---------------------
kono
parents:
diff changeset
275 -- Time Management --
kono
parents:
diff changeset
276 ---------------------
kono
parents:
diff changeset
277
kono
parents:
diff changeset
278 type SYSTEMTIME is record
kono
parents:
diff changeset
279 wYear : WORD;
kono
parents:
diff changeset
280 wMonth : WORD;
kono
parents:
diff changeset
281 wDayOfWeek : WORD;
kono
parents:
diff changeset
282 wDay : WORD;
kono
parents:
diff changeset
283 wHour : WORD;
kono
parents:
diff changeset
284 wMinute : WORD;
kono
parents:
diff changeset
285 wSecond : WORD;
kono
parents:
diff changeset
286 wMilliseconds : WORD;
kono
parents:
diff changeset
287 end record;
kono
parents:
diff changeset
288
kono
parents:
diff changeset
289 procedure GetSystemTime (pSystemTime : access SYSTEMTIME);
kono
parents:
diff changeset
290 pragma Import (Stdcall, GetSystemTime, "GetSystemTime");
kono
parents:
diff changeset
291
kono
parents:
diff changeset
292 procedure GetSystemTimeAsFileTime (lpFileTime : access Long_Long_Integer);
kono
parents:
diff changeset
293 pragma Import (Stdcall, GetSystemTimeAsFileTime, "GetSystemTimeAsFileTime");
kono
parents:
diff changeset
294
kono
parents:
diff changeset
295 function FileTimeToSystemTime
kono
parents:
diff changeset
296 (lpFileTime : access Long_Long_Integer;
kono
parents:
diff changeset
297 lpSystemTime : access SYSTEMTIME) return BOOL;
kono
parents:
diff changeset
298 pragma Import (Stdcall, FileTimeToSystemTime, "FileTimeToSystemTime");
kono
parents:
diff changeset
299
kono
parents:
diff changeset
300 function SystemTimeToFileTime
kono
parents:
diff changeset
301 (lpSystemTime : access SYSTEMTIME;
kono
parents:
diff changeset
302 lpFileTime : access Long_Long_Integer) return BOOL;
kono
parents:
diff changeset
303 pragma Import (Stdcall, SystemTimeToFileTime, "SystemTimeToFileTime");
kono
parents:
diff changeset
304
kono
parents:
diff changeset
305 function FileTimeToLocalFileTime
kono
parents:
diff changeset
306 (lpFileTime : access Long_Long_Integer;
kono
parents:
diff changeset
307 lpLocalFileTime : access Long_Long_Integer) return BOOL;
kono
parents:
diff changeset
308 pragma Import (Stdcall, FileTimeToLocalFileTime, "FileTimeToLocalFileTime");
kono
parents:
diff changeset
309
kono
parents:
diff changeset
310 function LocalFileTimeToFileTime
kono
parents:
diff changeset
311 (lpFileTime : access Long_Long_Integer;
kono
parents:
diff changeset
312 lpLocalFileTime : access Long_Long_Integer) return BOOL;
kono
parents:
diff changeset
313 pragma Import (Stdcall, LocalFileTimeToFileTime, "LocalFileTimeToFileTime");
kono
parents:
diff changeset
314
kono
parents:
diff changeset
315 procedure Sleep (dwMilliseconds : DWORD);
kono
parents:
diff changeset
316 pragma Import (Stdcall, Sleep, External_Name => "Sleep");
kono
parents:
diff changeset
317
kono
parents:
diff changeset
318 function QueryPerformanceCounter
kono
parents:
diff changeset
319 (lpPerformanceCount : access LARGE_INTEGER) return BOOL;
kono
parents:
diff changeset
320 pragma Import
kono
parents:
diff changeset
321 (Stdcall, QueryPerformanceCounter, "QueryPerformanceCounter");
kono
parents:
diff changeset
322
kono
parents:
diff changeset
323 ------------
kono
parents:
diff changeset
324 -- Module --
kono
parents:
diff changeset
325 ------------
kono
parents:
diff changeset
326
kono
parents:
diff changeset
327 function GetModuleHandleEx
kono
parents:
diff changeset
328 (dwFlags : DWORD;
kono
parents:
diff changeset
329 lpModuleName : Address;
kono
parents:
diff changeset
330 phModule : access HANDLE) return BOOL;
kono
parents:
diff changeset
331 pragma Import (Stdcall, GetModuleHandleEx, "GetModuleHandleExA");
kono
parents:
diff changeset
332
kono
parents:
diff changeset
333 function GetModuleFileName
kono
parents:
diff changeset
334 (hModule : HANDLE;
kono
parents:
diff changeset
335 lpFilename : Address;
kono
parents:
diff changeset
336 nSize : DWORD) return DWORD;
kono
parents:
diff changeset
337 pragma Import (Stdcall, GetModuleFileName, "GetModuleFileNameA");
kono
parents:
diff changeset
338
kono
parents:
diff changeset
339 function FreeLibrary (hModule : HANDLE) return BOOL;
kono
parents:
diff changeset
340 pragma Import (Stdcall, FreeLibrary, "FreeLibrary");
kono
parents:
diff changeset
341
kono
parents:
diff changeset
342 end System.Win32;