1 /*
2 ** Zabbix
3 ** Copyright (C) 2001-2021 Zabbix SIA
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 **/
19 
20 #ifndef ZABBIX_SYMBOLS_H
21 #define ZABBIX_SYMBOLS_H
22 
23 #if defined(_WINDOWS) || defined(__MINGW32__)
24 
25 /* some definitions which are not available on older MS Windows versions */
26 typedef enum {
27 	/* we only use below values, the rest of enumerated values are omitted here */
28 	zbx_FileBasicInfo	= 0,
29 	zbx_FileIdInfo		= 18
30 } ZBX_FILE_INFO_BY_HANDLE_CLASS;
31 
32 typedef struct {
33 	LARGE_INTEGER	CreationTime;
34 	LARGE_INTEGER	LastAccessTime;
35 	LARGE_INTEGER	LastWriteTime;
36 	LARGE_INTEGER	ChangeTime;
37 	DWORD		FileAttributes;
38 } ZBX_FILE_BASIC_INFO;
39 
40 typedef struct {
41 	ULONGLONG	LowPart;
42 	ULONGLONG	HighPart;
43 } ZBX_EXT_FILE_ID_128;
44 
45 typedef struct {
46 	ULONGLONG		VolumeSerialNumber;
47 	ZBX_EXT_FILE_ID_128	FileId;
48 } ZBX_FILE_ID_INFO;
49 
50 DWORD	(__stdcall *zbx_GetGuiResources)(HANDLE, DWORD);
51 BOOL	(__stdcall *zbx_GetProcessIoCounters)(HANDLE, PIO_COUNTERS);
52 BOOL	(__stdcall *zbx_GetPerformanceInfo)(PPERFORMANCE_INFORMATION, DWORD);
53 BOOL	(__stdcall *zbx_GlobalMemoryStatusEx)(LPMEMORYSTATUSEX);
54 BOOL	(__stdcall *zbx_GetFileInformationByHandleEx)(HANDLE, ZBX_FILE_INFO_BY_HANDLE_CLASS, LPVOID, DWORD);
55 
56 void	import_symbols(void);
57 
58 #else
59 #	define import_symbols()
60 #endif
61 
62 #endif
63