diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-08-27 10:28:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-08-27 11:32:29 +0200 |
commit | 8d8e5ab9193785acc4e1cb05e0db7f97afde1e2b (patch) | |
tree | 367a74edb2f2d7e65bf6c34c6bf009eca0ad87b3 /testtools | |
parent | c4709b6192340a4d5a82bf156a7342aba6aa99a1 (diff) |
Use PSAPI functionality directly
Dynamically trying to obtain the two PSAPI functions was apparently originally
done because "This version can fail because PSAPI.DLL is not always part of
NT 4 despite MSDN Libary 6.0a say so", according to the comment added with
961512bd9ae008fdd8ab5cdf1ba6b5d25ffb0429 "#94875# Added additional method (for
NT4) to determine the module containing an address". (That comment was removed
again in 515d2579d305a6127c6c194319a58eac62437e33 "Replace legacy dynamically-
loaded functions with statically linked ones", which curiously left the dynamic
loading of PSAPI.DLL in place there, though.)
<https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocessmodules>
states that the PSAPI functionality is available in "Kernel32.dll on Windows 7
and Windows Server 2008 R2; Psapi.dll (if PSAPI_VERSION=1) on Windows 7 and
Windows Server 2008 R2; Psapi.dll on Windows Server 2008, Windows Vista, Windows
Server 2003 and Windows XP". I do not find any mention of PSAPI_VERSION across
our code base, so assume that PSAPI_VERSION=1 would be some legacy mode that we
do not use, so with our baseline of Windows 7 (cf. README.md), relying on the
PSAPI functionality being available without adding anything specific to
gb_Library_use_system_win32_libs,sal should presumably be OK.
Change-Id: I55ab29be2a3ee3984c6987e953819cb2e92e4aa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121136
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'testtools')
0 files changed, 0 insertions, 0 deletions