Skip to content

Commit 8ba1628

Browse files
committed
Updating platform toolset to VS2022 and updating headers for same
1 parent 5bff278 commit 8ba1628

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
*.tlog
22
bin/
33
obj/
4+
.vs/
45
**obj/**
56
*.obj
67
*.pdb
78
*.res
89
*.log
910
*.idb
11+
*.ilk
12+
*.recipe
1013
*.pch
1114
*.sdf
1215
*.ipch
@@ -15,4 +18,6 @@ obj/
1518
*.db
1619
packages/
1720
*.opendb
18-
*.user
21+
*.user
22+
*.vspscc
23+
*.lib

Credential/CredUILauncher/CredUILauncher.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<SccAuxPath>SAK</SccAuxPath>
2727
<SccLocalPath>SAK</SccLocalPath>
2828
<SccProvider>SAK</SccProvider>
29+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2930
</PropertyGroup>
3031
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3132
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -47,7 +48,7 @@
4748
</PropertyGroup>
4849
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4950
<ConfigurationType>Application</ConfigurationType>
50-
<PlatformToolset>v140</PlatformToolset>
51+
<PlatformToolset>v143</PlatformToolset>
5152
<CharacterSet>Unicode</CharacterSet>
5253
</PropertyGroup>
5354
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

Credential/NFCRingCredentialProvider/NFCRingCredentialProvider.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<SccAuxPath>SAK</SccAuxPath>
2626
<SccLocalPath>SAK</SccLocalPath>
2727
<SccProvider>SAK</SccProvider>
28+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2829
</PropertyGroup>
2930
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3031
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -36,7 +37,7 @@
3637
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
3738
<ConfigurationType>DynamicLibrary</ConfigurationType>
3839
<UseDebugLibraries>true</UseDebugLibraries>
39-
<PlatformToolset>v140</PlatformToolset>
40+
<PlatformToolset>v143</PlatformToolset>
4041
<CharacterSet>Unicode</CharacterSet>
4142
</PropertyGroup>
4243
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

Credential/NFCRingCredentialProvider/Reader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <thread>
1818
#include "NFCCredentialProvider.h"
1919
#include "guid.h"
20+
#include <string>
2021

2122
#pragma comment(lib, "Ws2_32.lib")
2223

Management/RegistryWriter/NewToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ private void frmNewToken_Load(object sender, EventArgs e)
6464
{
6565
// still waiting for it to be scanned
6666
value += 7;
67+
if (value > 100)
68+
value = 100;
6769
ClientCommon.SetControlPropertyThreadSafe(pgbAwaitingToken, "Value", value);
6870
}
6971
}, task, 1000, 1000);

Service/NFCRingServiceCore/ServiceCore.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private void ScanForId()
111111
//Thread.Sleep(10000);
112112
List<string> currentTokens = new List<string>();
113113
SCardContext sCardContext = new SCardContext();
114-
SerialContext serialContext = new SerialContext();
114+
//SerialContext serialContext = new SerialContext();
115115
// basically keep running until we're told to stop
116116
while(state == ServiceState.Starting || state == ServiceState.Running)
117117
{
@@ -129,7 +129,7 @@ private void ScanForId()
129129
//Marshal.FreeHGlobal(idloc);
130130
//Marshal.FreeHGlobal(errloc);
131131
List<string> ls = sCardContext.GetIds();
132-
ls = ls.Concat(serialContext.GetIds()).ToList();
132+
//ls = ls.Concat(serialContext.GetIds()).ToList();
133133
foreach (string id in ls)
134134
{
135135
//string id = ls.FirstOrDefault() ?? "";
@@ -212,7 +212,7 @@ private void ScanForId()
212212
// sleep for configured delay?
213213
Thread.Sleep(100);
214214
}
215-
serialContext.Stop();
215+
//serialContext.Stop();
216216
Log("NFC Reading stopped");
217217
}
218218

@@ -603,7 +603,7 @@ private bool LoadConfig()
603603

604604
private bool SaveConfig()
605605
{
606-
File.WriteAllText(appPath + @"\Application.config", JsonConvert.SerializeObject(ApplicationConfiguration));
606+
File.WriteAllText(appPath + @"\Application.config", JsonConvert.SerializeObject(ApplicationConfiguration, Formatting.Indented));
607607
Log("Configuration saved to " + appPath + @"\Application.config");
608608
return true;
609609
}

0 commit comments

Comments
 (0)