Input needed regarding changing the SYSTEM_PROCESS_INFORMATION struct

Paul Vriens Paul.Vriens at xs4all.nl
Mon Apr 18 13:00:25 CDT 2005


Hi,

our current structure is incorrect:

#ifdef __WINESRC__
    DWORD dwOffset;
    DWORD dwThreadCount;
    DWORD dwUnknown1[6];
    FILETIME ftCreationTime;
    DWORD dwUnknown2[5];
    WCHAR *pszProcessName;
    DWORD dwBasePriority;
    DWORD dwProcessID;
    DWORD dwParentProcessID;
    DWORD dwHandleCount;
    DWORD dwUnknown3;
    DWORD dwUnknown4;
    DWORD dwVirtualBytesPeak;
    DWORD dwVirtualBytes;
    DWORD dwPageFaults;
    DWORD dwWorkingSetPeak;
    DWORD dwWorkingSet;
    DWORD dwUnknown5;
    DWORD dwPagedPool;
    DWORD dwUnknown6;
    DWORD dwNonPagedPool;
    DWORD dwPageFileBytesPeak;
    DWORD dwPrivateBytes;
    DWORD dwPageFileBytes;
    DWORD dwUnknown7[4];
    THREADINFO ti[1];
#else

I would like this to change into:

typedef struct _SYSTEM_PROCESS_INFORMATION {
#ifdef __WINESRC__
    DWORD dwOffset;
    DWORD dwThreadCount;
    DWORD dwUnknown1[6];
    FILETIME ftCreationTime;
    FILETIME ftUserTime;
    FILETIME ftKernelTime;
    UNICODE_STRING lpProcessName;
    DWORD dwBasePriority;
    DWORD dwProcessId;
    DWORD dwParentProcessId;
    DWORD dwHandleCount;
    DWORD dwUnknown2[2];
    VM_COUNTERS VmCounters;
    IO_COUNTERS IoCounters;
    THREAD_INFO Threads[1];
#else

Is this acceptable and what are the possible pitfalls I have to look
into?

One thing to note is that the defined struct for windows is also not
correct but is specified as such on MSDN.

Another thing is, how can I make a unit test to cover both windows and
wine. I can only use items from the windows struct to test. What I did
as a quick hack is have a private copy of the struct in the test itself.

Cheers,

Paul.




More information about the wine-devel mailing list