forked from mirror/dmidecode
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwinsmbios.h
69 lines (59 loc) · 2.19 KB
/
winsmbios.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Functions to allow to read SMBIOS from physical memory on windows
* or to get the SMBIOS table on windows 2003 SP1 and above.
*
* This file is part of the dmidecode project.
*
* (C) 2002-2006 Hugo Weber <address@hidden>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For the avoidance of doubt the "preferred form" of this code is one which
* is in an open unpatent encumbered format. Where cryptographic key signing
* forms part of the process of creating an executable the information
* including keys needed to generate an equivalently functional executable
* are deemed to be part of the source code.
*/
#ifdef __WIN32__
#ifndef WINSMBIOS_H
#define WINSMBIOS_H
#include "types.h"
#define WIN_UNSUPORTED 1
#define WIN_NT_2K_XP 2
#define WIN_2003_VISTA 3
/*
* Clean multi-char constant definition
*/
#define MC(a,b,c,d) ( ((a)<<24) | ((b)<<16) | ((c)<<8) | (d) )
#define RSMB() MC('R','S','M','B')
#define setlinebuf(a) ( setvbuf(a, (char *) NULL, _IOLBF, (size_t) 0) )
/*
* Struct needed to get the SMBIOS table using GetSystemFirmwareTable API.
*/
typedef struct _RawSMBIOSData {
u8 Used20CallingMethod;
u8 SMBIOSMajorVersion;
u8 SMBIOSMinorVersion;
u8 DmiRevision;
u32 Length;
u8 SMBIOSTableData[];
} RawSMBIOSData, *PRawSMBIOSData;
int get_windows_platform(void);
RawSMBIOSData *get_raw_smbios_table(void);
int count_smbios_structures(u8 *buff, u32 len);
void *mem_chunk_win(off_t base, size_t len);
BOOLEAN LocateNtdllEntryPoints(void);
#endif /* WINSMBIOS_H */
#endif /* __WIN32__ */