diff --git a/Redist/Swelio32.dll b/Redist/Swelio32.dll
index 1898ec4..1cbbc2b 100644
Binary files a/Redist/Swelio32.dll and b/Redist/Swelio32.dll differ
diff --git a/Redist/Swelio64.dll b/Redist/Swelio64.dll
index ec22117..a151ec6 100644
Binary files a/Redist/Swelio64.dll and b/Redist/Swelio64.dll differ
diff --git a/Samples/C#/EIDTestApp/EIDTestApp.csproj b/Samples/C#/EIDTestApp/EIDTestApp.csproj
index 5c56cb5..6c26e5a 100755
--- a/Samples/C#/EIDTestApp/EIDTestApp.csproj
+++ b/Samples/C#/EIDTestApp/EIDTestApp.csproj
@@ -16,7 +16,7 @@
3.5
- v4.0
+ v4.7
publish\
true
@@ -43,6 +43,7 @@
prompt
4
x86
+ false
pdbonly
@@ -51,6 +52,7 @@
TRACE
prompt
4
+ false
true
@@ -59,6 +61,7 @@
full
x86
prompt
+ false
bin\x86\Release\
@@ -67,6 +70,7 @@
pdbonly
x86
prompt
+ false
true
@@ -77,6 +81,7 @@
true
GlobalSuppressions.cs
prompt
+ false
bin\x64\Release\
@@ -87,6 +92,7 @@
true
GlobalSuppressions.cs
prompt
+ false
diff --git a/Samples/C#/EIDTestApp/FormMain.cs b/Samples/C#/EIDTestApp/FormMain.cs
index 8764194..b90fbd2 100755
--- a/Samples/C#/EIDTestApp/FormMain.cs
+++ b/Samples/C#/EIDTestApp/FormMain.cs
@@ -6,17 +6,8 @@
//used for purposes other than as intended.
using System;
-using System.IO;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
using System.Drawing;
-using System.Text;
using System.Windows.Forms;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using System.Security.Cryptography;
-using System.Security.Cryptography.X509Certificates;
using Swelio.Engine;
namespace EIDTestApp
@@ -192,6 +183,8 @@ private void ActivateCardEventsTracing()
engine.CardInserted += new EventHandler(engine_CardInserted);
engine.CardRemoved += new EventHandler(engine_CardRemoved);
engine.ReadersListChanged += new EventHandler(engine_ReadersListChanged);
+ engine.TraceHardwareEvents = true;
+ engine.TraceServiceEvents = true;
engine.TraceEvents = true;
}
diff --git a/Samples/C#/EIDTestApp/Program.cs b/Samples/C#/EIDTestApp/Program.cs
index e96ffe2..61946bd 100755
--- a/Samples/C#/EIDTestApp/Program.cs
+++ b/Samples/C#/EIDTestApp/Program.cs
@@ -12,9 +12,17 @@ static class Program
[STAThread]
static void Main()
{
+
+ if (Environment.OSVersion.Version.Major >= 6)
+ SetProcessDPIAware();
+
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMain());
}
+
+ [System.Runtime.InteropServices.DllImport("user32.dll")]
+ private static extern bool SetProcessDPIAware();
+
}
}
\ No newline at end of file
diff --git a/Samples/C#/EIDTestApp/Properties/Resources.Designer.cs b/Samples/C#/EIDTestApp/Properties/Resources.Designer.cs
index 3ca48f5..4cf52e3 100755
--- a/Samples/C#/EIDTestApp/Properties/Resources.Designer.cs
+++ b/Samples/C#/EIDTestApp/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.18408
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@ namespace EIDTestApp.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/Samples/C#/EIDTestApp/Properties/Settings.Designer.cs b/Samples/C#/EIDTestApp/Properties/Settings.Designer.cs
index ec6a5bc..4cc3e69 100755
--- a/Samples/C#/EIDTestApp/Properties/Settings.Designer.cs
+++ b/Samples/C#/EIDTestApp/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.18408
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace EIDTestApp.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/Samples/C#/EIDTestApp/app.config b/Samples/C#/EIDTestApp/app.config
index fcd0c93..245587d 100755
--- a/Samples/C#/EIDTestApp/app.config
+++ b/Samples/C#/EIDTestApp/app.config
@@ -1,3 +1,3 @@
-
+
diff --git a/Swelio.Engine/Swelio.Engine/Manager.cs b/Swelio.Engine/Swelio.Engine/Manager.cs
index 14aa115..ebc9b41 100644
--- a/Swelio.Engine/Swelio.Engine/Manager.cs
+++ b/Swelio.Engine/Swelio.Engine/Manager.cs
@@ -21,6 +21,7 @@ public sealed class Manager : IDisposable
private List readers;
private bool traceEvents;
private bool traceServiceEvents;
+ private bool traceHardwareEvents;
private ReaderCallbackDelegate InternalCallbackDelegate;
@@ -30,6 +31,8 @@ public sealed class Manager : IDisposable
public Manager()
{
readers = new List();
+ traceHardwareEvents = true;
+ traceServiceEvents = true;
InternalCallbackDelegate = new ReaderCallbackDelegate(EventTracer);
}
@@ -98,10 +101,23 @@ private void EventTracer(ref int readerNumber, ref int eventCode, IntPtr userCon
}
break;
case CardEvent.ReadersChange:
- ReloadReadersList();
- if (ReadersListChanged != null)
+ int newReadersCount = NativeMethods.GetReadersCount();
+ if ( (newReadersCount != readers.Count) && traceHardwareEvents)
{
- ReadersListChanged(this, EventArgs.Empty);
+ ReloadReadersList();
+ if (ReadersListChanged != null)
+ {
+ ReadersListChanged(this, EventArgs.Empty);
+ }
+ }
+ else
+ {
+ //Just continue to trace events
+ if (Active)
+ {
+ StopEventsTracing();
+ StartEventsTracing();
+ }
}
break;
case CardEvent.UnknownEvent:
@@ -142,6 +158,16 @@ public bool TraceServiceEvents
NativeMethods.IgnoreServiceEvents(!value);
}
}
+
+ public bool TraceHardwareEvents
+ {
+ get { return traceHardwareEvents; }
+ set
+ {
+ traceHardwareEvents = value;
+ }
+ }
+
public event EventHandler CardInserted;
public event EventHandler CardRemoved;
public event EventHandler ReadersListChanged;
diff --git a/Swelio.Engine/Swelio.Engine/NativeMethods.cs b/Swelio.Engine/Swelio.Engine/NativeMethods.cs
index b9b3e18..5865819 100644
--- a/Swelio.Engine/Swelio.Engine/NativeMethods.cs
+++ b/Swelio.Engine/Swelio.Engine/NativeMethods.cs
@@ -2151,7 +2151,7 @@ public static void RemoveCallback()
}
- public static void IgnoreServiceEvents(bool valie)
+ public static void IgnoreServiceEvents(bool value)
{
if (IsWOW64())
{