diff options
author | Julien Lebot <julien.ar.lebot@gmail.com> | 2020-07-05 04:02:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-05 04:02:03 +0200 |
commit | 54de8823918fc0484223a077eafc917755334b5b (patch) | |
tree | 662af625b081fdb6d6b3f8fe2cb271faf9974a59 /psutil/_psutil_common.c | |
parent | 04b40609276c15b59df065659a0a8ce41b316cef (diff) | |
download | psutil-54de8823918fc0484223a077eafc917755334b5b.tar.gz |
Add support for Windows Nano Server (#1768)
Diffstat (limited to 'psutil/_psutil_common.c')
-rw-r--r-- | psutil/_psutil_common.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/psutil/_psutil_common.c b/psutil/_psutil_common.c index d63b4d9c..7a87c3c1 100644 --- a/psutil/_psutil_common.c +++ b/psutil/_psutil_common.c @@ -264,10 +264,6 @@ psutil_loadlibs() { "ntdll.dll", "NtSetInformationProcess"); if (! NtSetInformationProcess) return 1; - WinStationQueryInformationW = psutil_GetProcAddressFromLib( - "winsta.dll", "WinStationQueryInformationW"); - if (! WinStationQueryInformationW) - return 1; NtQueryObject = psutil_GetProcAddressFromLib( "ntdll.dll", "NtQueryObject"); if (! NtQueryObject) @@ -320,6 +316,13 @@ psutil_loadlibs() { // minumum requirement: Win 7 GetLogicalProcessorInformationEx = psutil_GetProcAddressFromLib( "kernel32", "GetLogicalProcessorInformationEx"); + // minimum requirements: Windows Server Core + WTSEnumerateSessionsW = psutil_GetProcAddressFromLib( + "wtsapi32.dll", "WTSEnumerateSessionsW"); + WTSQuerySessionInformationW = psutil_GetProcAddressFromLib( + "wtsapi32.dll", "WTSQuerySessionInformationW"); + WTSFreeMemory = psutil_GetProcAddressFromLib( + "wtsapi32.dll", "WTSFreeMemory"); PyErr_Clear(); return 0; |