GetPerformanceInfo (psapi)
Last changed: -202.89.40.201

.
Summary
Retrieves the performance values contained in the PERFORMANCE_INFORMATION structure.

C# Signature:

[DllImport("psapi.dll", SetLastError = true)]
static extern bool GetPerformanceInfo(out PERFORMANCE_INFORMATION pPerformanceInformation, uint cb);

VB Signature:

Declare Function GetPerformanceInfo Lib "psapi.dll" (TODO) As Boolean

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]

    public struct PERFORMANCE_INFORMATION
    {
        uint cb;
        UIntPtr CommitTotal;
        UIntPtr CommitLimit;
        UIntPtr CommitPeak;
        UIntPtr PhysicalTotal;
        UIntPtr PhysicalAvailable;
        UIntPtr SystemCache;
        UIntPtr KernelTotal;
        UIntPtr KernelPaged;
        UIntPtr KernelNonpaged;
        UIntPtr PageSize;
        uint HandleCount;
        uint ProcessCount;
        uint ThreadCount;
    }

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683210%28v=vs.85%29.aspx (GetPerformanceInfo)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms684824%28v=vs.85%29.aspx (PERFORMANCE_INFORMATION struct)