            <<< DECWET::DOCD$:[NOTES$LIBRARY]NT-DEVELOPERS.NOTE;1 >>>
                         -< MS Windows NT Developers >-
================================================================================
Note 3117.3             Determining working set size ...
                 3 of 3
DECWET::MVB "Monty VanderBilt"                       36 lines  12-NOV-1996 12:46
                          -< GetProcessMemoryInfo() >-
--------------------------------------------------------------------------------
You can try a function in PSAPI.DLL (some documentation in Aug 96 MSJ).
Get the PSAPI.LIB and PSAPI.H files from the PFMON sample. I don't know why
these things are "distributed" and documented in such a back door way.

This is the routine that might work. I haven't tried it yet though...

// Structure for GetProcessMemoryInfo()

typedef struct _PROCESS_MEMORY_COUNTERS {
    DWORD cb;
    DWORD PageFaultCount;
    DWORD PeakWorkingSetSize;
    DWORD WorkingSetSize;
    DWORD QuotaPeakPagedPoolUsage;
    DWORD QuotaPagedPoolUsage;
    DWORD QuotaPeakNonPagedPoolUsage;
    DWORD QuotaNonPagedPoolUsage;
    DWORD PagefileUsage;
    DWORD PeakPagefileUsage;
} PROCESS_MEMORY_COUNTERS;
typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;

BOOL
WINAPI
GetProcessMemoryInfo(
    HANDLE Process,
    PPROCESS_MEMORY_COUNTERS ppsmemCounters,
    DWORD cb
    );

  hProcess - Handle for the process being queried.

  ppsmemCounters - buffer that will receive the PROCESS_MEMORY_COUNTERS.

  cb - size of ppsmemCounters

