1+ // Copyright (c) Microsoft Corporation.
2+ // Licensed under the MIT License.
3+
14#include < memory>
25#include < vector>
36
47#include < Windows.h>
58#include < fwpmu.h>
69
7- #include < ctWmiPerformance .hpp>
10+ #include " ctPerformanceCounter .hpp"
811
912#include " WfpCounters.h"
1013
1114#include < wil/stl.h>
1215#include < wil/resource.h>
1316
1417const static ctl::ctWmiService* g_wmi = nullptr ;
15- static ctl::ctWmiPerformance * g_wmi_performance = nullptr ;
16- static std::shared_ptr<ctl::ctWmiPerformanceCounter <ULONGLONG>>* g_wfp_filter_count;
18+ static ctl::ctPerformanceCounter * g_wmi_performance = nullptr ;
19+ static std::shared_ptr<ctl::ctPerformanceCounterCounter <ULONGLONG>>* g_wfp_filter_count;
1720
1821static HANDLE g_wfp_engineHandle = nullptr ;
1922HANDLE GetFwpmEngineHandle ()
@@ -33,14 +36,14 @@ HANDLE GetFwpmEngineHandle()
3336void InitializeWfpPerfCounters ()
3437{
3538 g_wmi = new ctl::ctWmiService (L" root\\ cimv2" );
36- g_wmi_performance = new ctl::ctWmiPerformance (*g_wmi);
37- g_wfp_filter_count = new std::shared_ptr<ctl::ctWmiPerformanceCounter <ULONGLONG>>();
39+ g_wmi_performance = new ctl::ctPerformanceCounter (*g_wmi);
40+ g_wfp_filter_count = new std::shared_ptr<ctl::ctPerformanceCounterCounter <ULONGLONG>>();
3841
3942 *g_wfp_filter_count = ctCreatePerfCounter<ULONGLONG>(
4043 *g_wmi,
4144 ctl::ctWmiEnumClassName::WfpFilterCount,
4245 L" Total" ,
43- ctl::ctWmiPerformanceCollectionType ::Detailed);
46+ ctl::ctPerformanceCounterCollectionType ::Detailed);
4447 g_wmi_performance->add_counter (*g_wfp_filter_count);
4548}
4649
0 commit comments