Hi, Our compatibility with w2k and XP sux! Here is a old psx.exe command and compare it with the new windows 2k compatible one we have.
http://adsl-64-217-116-74.dsl.hstntx.swbell.net/ftp/pub/ReactOS/psx.exe Just in case!
Looking at Nebbetts book Win NT/2k Native API Ref, our SYSTEM_PROCESS_INFORMATION for w2k is not close at all! Where is LLLONG or LONGLONG PrivatePageCount?
What is funny, psx.exe uses NT4 structures! So how can we use w2k structs with w2k and see if they really work?
Thanks, James
James Tabor wrote:
Hi, Our compatibility with w2k and XP sux! Here is a old psx.exe command and compare it with the new windows 2k compatible one we have.
http://adsl-64-217-116-74.dsl.hstntx.swbell.net/ftp/pub/ReactOS/psx.exe Just in case!
Looking at Nebbetts book Win NT/2k Native API Ref, our SYSTEM_PROCESS_INFORMATION for w2k is not close at all! Where is LLLONG or LONGLONG PrivatePageCount?
What is funny, psx.exe uses NT4 structures! So how can we use w2k structs with w2k and see if they really work?
Thanks, James _______________________________________________
I personally rewrote our SYSTEM_PROCESS_INFORMATION because Nebett's stuff is totally outdated. My structures are up to date and correct, both in their naming and structure. AFAIK there are no other such correct versions online.
Best regards, Alex Ionescu
Alex Ionescu wrote:
James Tabor wrote:
Hi, Our compatibility with w2k and XP sux! Here is a old psx.exe command and compare it with the new windows 2k compatible one we have.
http://adsl-64-217-116-74.dsl.hstntx.swbell.net/ftp/pub/ReactOS/psx.exe Just in case!
Looking at Nebbetts book Win NT/2k Native API Ref, our SYSTEM_PROCESS_INFORMATION for w2k is not close at all! Where is LLLONG or LONGLONG PrivatePageCount?
What is funny, psx.exe uses NT4 structures! So how can we use w2k structs with w2k and see if they really work?
Thanks, James _______________________________________________
I personally rewrote our SYSTEM_PROCESS_INFORMATION because Nebett's stuff is totally outdated. My structures are up to date and correct, both in their naming and structure. AFAIK there are no other such correct versions online.
Best regards, Alex Ionescu
Hi Alex! We need to test our code with real hardware and XP. ps.exe was a good way to black box our structure test. The old program works on my XP here and all of my 2ks at work. So there must be two things going on. 1, special setup so old structures can be supported in XP or 2k, or 2. Some kind of misinformation is out there on the net. I personally tested Nebbetts structures and LOL they did not work. PSX.exe is the only thing that can prove something has changed. So far I know we are wrong with respect of our structures working with SYSTEM_PROCESS_INFORMATION and windows XP and 2k.
What now could go wrong, James
James Tabor wrote:
Hi Alex! We need to test our code with real hardware and XP. ps.exe was a good way to black box our structure test.
ps.exe is HORRIBLY broken and Thomas was supposed to fix it but it looks like he gave up or something.
The old program works on my XP here and all of my 2ks at work. So there must be two things going on. 1, special setup so old structures can be supported in XP or 2k, or
- Some kind of
misinformation is out there on the net. I personally tested Nebbetts structures and LOL they did not work. PSX.exe is the only thing that can prove something has changed. So far I know we are wrong with respect of our structures working with SYSTEM_PROCESS_INFORMATION and windows XP and 2k.
Our structures are not wrong. Perhaps we still return the wrong version info somewhere, or tehre's a bug in NtQuerySystemInformation.
What now could go wrong, James
Best regards, Alex Ionescu
Alex Ionescu wrote:
Our structures are not wrong. Perhaps we still return the wrong version info somewhere, or tehre's a bug in NtQuerySystemInformation.
What now could go wrong, James
Best regards, Alex Ionescu
I patch this to ps.c and I got it to work on xp! Needs more testing! XP seems to tell what type of structure you are using, both NT4 and W2k work for some reason.
#include <windows.h> /* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */ #include <ntos/types.h>
typedef ULARGE_INTEGER TIME, *PTIME;
typedef struct _SYSTEM_THREADS { LARGE_INTEGER KernelTime; LARGE_INTEGER UserTime; LARGE_INTEGER CreateTime; ULONG TickCount; PVOID StartEIP; CLIENT_ID ClientId; ULONG DynamicPriority; ULONG BasePriority; ULONG nSwitches; DWORD State; KWAIT_REASON WaitReason; } SYSTEM_THREADS, *PSYSTEM_THREADS; typedef struct _SYSTEM_PROCESSES { SIZE_T NextEntryDelta; ULONG ThreadCount; ULONG Unused1 [6]; TIME CreateTime; TIME UserTime; TIME KernelTime; UNICODE_STRING ProcessName; ULONG BasePriority; ULONG ProcessId; ULONG InheritedFromProcessId; ULONG HandleCount;
ULONG SessionId; ULONG PageDirectoryFrame; ULONG PeakVirtualSizeBytes; ULONG TotalVirtualSizeBytes; ULONG PageFaultCount; ULONG PeakWorkingSetSizeBytes; ULONG TotalWorkingSetSizeBytes; ULONG PeakPagedPoolUsagePages; ULONG TotalPagedPoolUsagePages; ULONG PeakNonPagedPoolUsagePages; ULONG TotalNonPagedPoolUsagePages; ULONG TotalPageFileUsageBytes; ULONG PeakPageFileUsageBytes; ULONG TotalPrivateBytes;
LARGE_INTEGER ReadOperationCount; LARGE_INTEGER WriteOperationCount; LARGE_INTEGER OtherOperationCount; LARGE_INTEGER ReadTransferCount; LARGE_INTEGER WriteTransferCount; LARGE_INTEGER OtherTransferCount;
SYSTEM_THREADS Threads [1]; } SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;
Ok! This works! Ignore the structure names. I had to change them so to keep them away from the prim headers. The rest of the names and types should all be the same.
#include <windows.h> /* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */ #include <ntos/types.h>
typedef struct _SYSTEM_THREADS { LARGE_INTEGER KernelTime; LARGE_INTEGER UserTime; LARGE_INTEGER CreateTime; ULONG WaitTime; PVOID StartAddress; CLIENT_ID ClientId; KPRIORITY Priority; LONG BasePriority; ULONG ContextSwitches; ULONG ThreadState; ULONG WaitReason; } SYSTEM_THREADS, *PSYSTEM_THREADS; typedef struct _SYSTEM_PROCESSES { ULONG NextEntryOffset; ULONG NumberOfThreads; LARGE_INTEGER SpareLi1; LARGE_INTEGER SpareLi2; LARGE_INTEGER SpareLi3; LARGE_INTEGER CreateTime; LARGE_INTEGER UserTime; LARGE_INTEGER KernelTime; UNICODE_STRING ImageName; KPRIORITY BasePriority; HANDLE UniqueProcessId; HANDLE InheritedFromUniqueProcessId; ULONG HandleCount; ULONG SessionId; ULONG PageDirectoryFrame;
/* * This part corresponds to VM_COUNTERS_EX. * NOTE: *NOT* THE SAME AS VM_COUNTERS! */ ULONG PeakVirtualSize; ULONG VirtualSize; ULONG PageFaultCount; ULONG PeakWorkingSetSize; ULONG WorkingSetSize; ULONG QuotaPeakPagedPoolUsage; ULONG QuotaPagedPoolUsage; ULONG QuotaPeakNonPagedPoolUsage; ULONG QuotaNonPagedPoolUsage; ULONG PagefileUsage; ULONG PeakPagefileUsage; ULONG PrivateUsage;
/* This part corresponds to IO_COUNTERS */ LARGE_INTEGER ReadOperationCount; LARGE_INTEGER WriteOperationCount; LARGE_INTEGER OtherOperationCount; LARGE_INTEGER ReadTransferCount; LARGE_INTEGER WriteTransferCount; LARGE_INTEGER OtherTransferCount;
SYSTEM_THREADS Threads [1];
} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;