From: Louis Lenders xerox.xerox2000x@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58610 --- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/process.c | 10 +++++++ include/processsnapshot.h | 46 +++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 include/processsnapshot.h
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 83c374d2254..c2ad1d74034 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1186,6 +1186,7 @@ @ stdcall Process32Next (ptr ptr) @ stdcall Process32NextW (ptr ptr) @ stdcall -import ProcessIdToSessionId(long ptr) +@ stdcall -import PssQuerySnapshot(ptr long ptr long) @ stdcall -import PulseEvent(long) @ stdcall -import PurgeComm(long long) @ stdcall -i386 -private -norelay QT_Thunk() krnl386.exe16.QT_Thunk diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 48471834735..2f0d1b1ebb4 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1223,7 +1223,7 @@ # @ stub PssCaptureSnapshot # @ stub PssDuplicateSnapshot # @ stub PssFreeSnapshot -# @ stub PssQuerySnapshot +@ stdcall PssQuerySnapshot(ptr long ptr long) # @ stub PssWalkMarkerCreate # @ stub PssWalkMarkerFree # @ stub PssWalkMarkerGetPosition diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c index b75963fef1d..6fbfbd8d459 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -28,6 +28,7 @@ #include "winnls.h" #include "wincontypes.h" #include "winternl.h" +#include "processsnapshot.h"
#include "kernelbase.h" #include "wine/debug.h" @@ -1865,3 +1866,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CompareObjectHandles( HANDLE first, HANDLE second { return set_ntstatus( NtCompareObjects( first, second )); } + +/*********************************************************************** + * PssQuerySnapshot (kernelbase.@) + */ +DWORD WINAPI PssQuerySnapshot( HPSS handle, PSS_QUERY_INFORMATION_CLASS class, void *buffer, DWORD len ) +{ + FIXME( "(%p %u %p %lu)\n", handle ,class, buffer, len ); + return ERROR_NOT_FOUND; +} diff --git a/include/processsnapshot.h b/include/processsnapshot.h new file mode 100644 index 00000000000..3b5e6574cea --- /dev/null +++ b/include/processsnapshot.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2025 Louis Lenders + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _PROCESSSNAPSHOT_H_ +#define _PROCESSSNAPSHOT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum PSS_QUERY_INFORMATION_CLASS +{ + PSS_QUERY_PROCESS_INFORMATION = 0, + PSS_QUERY_VA_CLONE_INFORMATION = 1, + PSS_QUERY_AUXILIARY_PAGES_INFORMATION = 2, + PSS_QUERY_VA_SPACE_INFORMATION = 3, + PSS_QUERY_HANDLE_INFORMATION = 4, + PSS_QUERY_THREAD_INFORMATION = 5, + PSS_QUERY_HANDLE_TRACE_INFORMATION = 6, + PSS_QUERY_PERFORMANCE_COUNTERS = 7 +} PSS_QUERY_INFORMATION_CLASS; + +DECLARE_HANDLE(HPSS); + +DWORD WINAPI PssQuerySnapshot(HPSS,PSS_QUERY_INFORMATION_CLASS,void*,DWORD); + +#ifdef __cplusplus +} +#endif + +#endif /* _PROCESSSNAPSHOT_H_ */