Fix dlls/ntdll/tests/info.c compilation with the PSDK
Francois Gouget
fgouget at free.fr
Wed Aug 10 07:43:38 CDT 2005
When compiling with the Windows 2003 SP1 PSDK this test is missing a
lot of types and defines. So this patch adds them in case we are not
compiling with Wine's winternl.h headers.
Changelog:
* dlls/ntdll/tests/info.c
Francois Gouget <fgouget at free.fr>
Define missing types and macros if not using Wine's winternl.h
header. Fixes the compilation with the PSDK.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
-------------- next part --------------
Index: dlls/ntdll/tests/info.c
===================================================================
RCS file: /var/cvs/wine/dlls/ntdll/tests/info.c,v
retrieving revision 1.15
diff -u -p -r1.15 info.c
--- dlls/ntdll/tests/info.c 22 Jul 2005 19:48:16 -0000 1.15
+++ dlls/ntdll/tests/info.c 28 Jul 2005 13:39:12 -0000
@@ -20,6 +20,113 @@
#include "ntdll_test.h"
+#ifndef __WINE_WINTERNL_H
+
+typedef struct _KERNEL_USER_TIMES {
+ LARGE_INTEGER CreateTime;
+ LARGE_INTEGER ExitTime;
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
+
+#define SystemCacheInformation 21
+typedef struct _SYSTEM_CACHE_INFORMATION {
+ ULONG CurrentSize;
+ ULONG PeakSize;
+ ULONG PageFaultCount;
+ ULONG MinimumWorkingSet;
+ ULONG MaximumWorkingSet;
+ ULONG unused[4];
+} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
+
+#define SystemCpuInformation 1
+typedef struct _SYSTEM_CPU_INFORMATION {
+ WORD Architecture;
+ WORD Level;
+ WORD Revision;
+ WORD Reserved;
+ DWORD FeatureSet;
+} SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
+
+#define SystemKernelDebuggerInformation 35
+typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
+ BOOLEAN DebuggerEnabled;
+ BOOLEAN DebuggerNotPresent;
+} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
+
+typedef struct _SYSTEM_HANDLE_ENTRY {
+ ULONG OwnerPid;
+ BYTE ObjectType;
+ BYTE HandleFlags;
+ USHORT HandleValue;
+ PVOID ObjectPointer;
+ ULONG AccessMask;
+} SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
+
+#define SystemHandleInformation 16
+typedef struct _SYSTEM_HANDLE_INFORMATION {
+ ULONG Count;
+ SYSTEM_HANDLE_ENTRY Handle[1];
+} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
+
+#define MAXIMUM_FILENAME_LENGTH 256
+
+typedef struct _SYSTEM_MODULE
+{
+ ULONG Reserved1;
+ ULONG Reserved2;
+ PVOID ImageBaseAddress;
+ ULONG ImageSize;
+ ULONG Flags;
+ WORD Id;
+ WORD Rank;
+ WORD Unknown;
+ WORD NameOffset;
+ BYTE Name[MAXIMUM_FILENAME_LENGTH];
+} SYSTEM_MODULE, *PSYSTEM_MODULE;
+
+#define SystemModuleInformation 11
+typedef struct _SYSTEM_MODULE_INFORMATION
+{
+ ULONG ModulesCount;
+ SYSTEM_MODULE Modules[1];
+} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
+
+typedef struct _SYSTEM_THREAD_INFORMATION{
+ FILETIME ftKernelTime;
+ FILETIME ftUserTime;
+ FILETIME ftCreateTime;
+ DWORD dwTickCount;
+ DWORD dwStartAddress;
+ DWORD dwOwningPID;
+ DWORD dwThreadID;
+ DWORD dwCurrentPriority;
+ DWORD dwBasePriority;
+ DWORD dwContextSwitches;
+ DWORD dwThreadState;
+ DWORD dwWaitReason;
+ DWORD dwUnknown;
+} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
+
+#define ProcessIoCounters 2
+#define ProcessVmCounters 3
+#define ProcessTimes 4
+#define ProcessHandleCount 20
+typedef struct _VM_COUNTERS_ {
+ SIZE_T PeakVirtualSize;
+ SIZE_T VirtualSize;
+ ULONG PageFaultCount;
+ SIZE_T PeakWorkingSetSize;
+ SIZE_T WorkingSetSize;
+ SIZE_T QuotaPeakPagedPoolUsage;
+ SIZE_T QuotaPagedPoolUsage;
+ SIZE_T QuotaPeakNonPagedPoolUsage;
+ SIZE_T QuotaNonPagedPoolUsage;
+ SIZE_T PagefileUsage;
+ SIZE_T PeakPagefileUsage;
+} VM_COUNTERS, *PVM_COUNTERS;
+#endif
+
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
More information about the wine-patches
mailing list