Skip to content

Commit 30a9347

Browse files
committed
Large cleanup of ctl headers.
1 parent b7867e4 commit 30a9347

27 files changed

+5509
-3708
lines changed

FwDiagnose/FirewallRules.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#include <algorithm>
25
#include <vector>
36
#include <string>

FwDiagnose/FirewallRules.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#pragma once
25
#include <vector>
36
#include "NormalizedFirewallRule.h"

FwDiagnose/FwDiagnose.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#include <algorithm>
25
#include <iostream>
36
#include <numeric>
@@ -9,7 +12,6 @@
912
#include "firewall.h"
1013
#include "FirewallRules.h"
1114
#include "NormalizedFirewallRule.h"
12-
#include "ctWmiInitialize.hpp"
1315
#include "WfpCounters.h"
1416

1517
#include <wil/stl.h>

FwDiagnose/FwDiagnose.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#pragma once
25
#include <string>
36
#include <chrono>
4-
57
#include <Windows.h>
68

79
bool DebugPrintEnabled() noexcept;

FwDiagnose/FwDiagnose.vcxproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,18 @@
251251
<None Include="packages.config" />
252252
</ItemGroup>
253253
<ItemGroup>
254-
<ClInclude Include="..\ctl\ctString.hpp" />
254+
<ClInclude Include="..\ctl\ctEtwReader.hpp" />
255+
<ClInclude Include="..\ctl\ctEtwRecord.hpp" />
256+
<ClInclude Include="..\ctl\ctMath.hpp" />
257+
<ClInclude Include="..\ctl\ctNetAdapterAddresses.hpp" />
258+
<ClInclude Include="..\ctl\ctPerformanceCounter.hpp" />
259+
<ClInclude Include="..\ctl\ctRandom.hpp" />
260+
<ClInclude Include="..\ctl\ctSockaddr.hpp" />
261+
<ClInclude Include="..\ctl\ctSocketExtensions.hpp" />
262+
<ClInclude Include="..\ctl\ctThreadIocp.hpp" />
255263
<ClInclude Include="..\ctl\ctThreadpoolQueue.hpp" />
256-
<ClInclude Include="..\ctl\ctWmiClassObject.hpp" />
257-
<ClInclude Include="..\ctl\ctWmiEnumerate.hpp" />
258-
<ClInclude Include="..\ctl\ctWmiInitialize.hpp" />
264+
<ClInclude Include="..\ctl\ctTimer.hpp" />
259265
<ClInclude Include="..\ctl\ctWmiInstance.hpp" />
260-
<ClInclude Include="..\ctl\ctWmiPerformance.hpp" />
261-
<ClInclude Include="..\ctl\ctWmiProperties.hpp" />
262266
<ClInclude Include="..\ctl\ctWmiService.hpp" />
263267
<ClInclude Include="..\ctl\ctWmiVariant.hpp" />
264268
<ClInclude Include="firewall.h" />

FwDiagnose/NormalizedFirewallRule.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#pragma once
25

36
#include <string>

FwDiagnose/WfpCallouts.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#include <algorithm>
25
#include <string>
36
#include <windows.h>

FwDiagnose/WfpCounters.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
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

1417
const 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

1821
static HANDLE g_wfp_engineHandle = nullptr;
1922
HANDLE GetFwpmEngineHandle()
@@ -33,14 +36,14 @@ HANDLE GetFwpmEngineHandle()
3336
void 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

FwDiagnose/WfpCounters.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
// ReSharper disable CppInconsistentNaming
25
// ReSharper disable IdentifierTypo
36
#pragma once

FwDiagnose/WfpFilters.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
#include <algorithm>
25
#include <ranges>
36
#include <string>
@@ -11,7 +14,6 @@
1114
#include <wil/stl.h>
1215
#include <wil/resource.h>
1316

14-
1517
static std::vector<FilterDetails> g_all_filters;
1618

1719
/*

0 commit comments

Comments
 (0)