public static PdhCounter AddCounter(this PdhQuery query, string path) { Pdh .PdhAddEnglishCounter(query, path, IntPtr.Zero, out var counter) .EnsureSuccess(nameof(Pdh.PdhAddEnglishCounter)); return(counter); }
public static extern PdhStatus PdhCollectQueryData(PdhQuery query);
public static extern PdhStatus PdhAddEnglishCounter(PdhQuery query, string path, IntPtr userData, out PdhCounter counter);
public static extern PdhStatus PdhOpenQuery(string dataSource, IntPtr userData, out PdhQuery query);
public static PdhStatus CollectQueryData(this PdhQuery query) => Pdh.PdhCollectQueryData(query);