summaryrefslogtreecommitdiff
path: root/psutil/arch/windows/global.h
blob: 10ae640595d9df287ffa2cfd8c9b8e729432c6c8 (plain)
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
70
71
72
73
74
75
76
77
/*
 * Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.

 * List of constants and objects that are globally available.
 */

#include <windows.h>
#include "ntextapi.h"

extern int PSUTIL_WINVER;
extern SYSTEM_INFO PSUTIL_SYSTEM_INFO;
#define PSUTIL_WINDOWS_XP 51
#define PSUTIL_WINDOWS_SERVER_2003 52
#define PSUTIL_WINDOWS_VISTA 60
#define PSUTIL_WINDOWS_7 61
#define PSUTIL_WINDOWS_8 62
#define PSUTIL_WINDOWS_8_1 63
#define PSUTIL_WINDOWS_10 100
#define PSUTIL_WINDOWS_NEW MAXLONG

int psutil_load_globals();
PVOID psutil_GetProcAddress(LPCSTR libname, LPCSTR procname);
PVOID psutil_GetProcAddressFromLib(LPCSTR libname, LPCSTR procname);
PVOID psutil_SetFromNTStatusErr(NTSTATUS Status, const char *syscall);

_NtQuerySystemInformation \
    psutil_NtQuerySystemInformation;

_NtQueryInformationProcess \
    psutil_NtQueryInformationProcess;

_NtSetInformationProcess
    psutil_NtSetInformationProcess;

_WinStationQueryInformationW \
    psutil_WinStationQueryInformationW;

_RtlIpv4AddressToStringA \
    psutil_rtlIpv4AddressToStringA;

_RtlIpv6AddressToStringA \
    psutil_rtlIpv6AddressToStringA;

_GetExtendedTcpTable \
    psutil_GetExtendedTcpTable;

_GetExtendedUdpTable \
    psutil_GetExtendedUdpTable;

_GetActiveProcessorCount \
    psutil_GetActiveProcessorCount;

_GetTickCount64 \
    psutil_GetTickCount64;

_NtQueryObject \
    psutil_NtQueryObject;

_GetLogicalProcessorInformationEx \
    psutil_GetLogicalProcessorInformationEx;

_RtlGetVersion \
    psutil_RtlGetVersion;

_NtSuspendProcess \
    psutil_NtSuspendProcess;

_NtResumeProcess \
    psutil_NtResumeProcess;

_NtQueryVirtualMemory \
    psutil_NtQueryVirtualMemory;

_RtlNtStatusToDosErrorNoTeb \
    psutil_RtlNtStatusToDosErrorNoTeb;