diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4a4851a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,398 @@
+
+# Created by https://www.toptal.com/developers/gitignore/api/visualstudio
+# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudio
+
+### VisualStudio ###
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.tlog
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Nuget personal access tokens and Credentials
+nuget.config
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+### VisualStudio Patch ###
+# Additional files built by Visual Studio
+
+# End of https://www.toptal.com/developers/gitignore/api/visualstudio
\ No newline at end of file
diff --git a/InterSwap/InterSwap.csproj b/InterSwap/InterSwap.csproj
new file mode 100644
index 0000000..f3a6e13
--- /dev/null
+++ b/InterSwap/InterSwap.csproj
@@ -0,0 +1,12 @@
+
+
+
+ Exe
+ net5.0
+
+
+
+
+
+
+
diff --git a/InterSwap/Program.cs b/InterSwap/Program.cs
new file mode 100644
index 0000000..0b6f378
--- /dev/null
+++ b/InterSwap/Program.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Threading;
+using Interceptor;
+
+namespace InterSwap
+{
+ class Program
+ {
+ private static void FailSafe(object token)
+ {
+ var canToken = (CancellationToken)token;
+ var watch = new System.Diagnostics.Stopwatch();
+ watch.Start();
+ while (watch.ElapsedMilliseconds < 10000 && !canToken.IsCancellationRequested) { }
+ if (canToken.IsCancellationRequested)
+ return;
+ Console.WriteLine("Forced Ended.");
+ Environment.Exit(0);
+ }
+ static void Main(string[] args)
+ {
+ // Setting up fail safe thread.
+ var source = new CancellationTokenSource();
+ var failSafety = new Thread(FailSafe);
+ // Starting the fail safe thread.
+ // If for some reason after 10 seconds we are still running
+ // this thread will kill the program.
+ // We should never reach this with this program but you may need
+ // something like this while testing your own programs and you don't
+ // cause a system soft-lock.
+ failSafety.Start(source.Token);
+ // Tell the driver to capture all input.
+ var input = new Input
+ {
+ MouseFilterMode = MouseFilterMode.All,
+ KeyboardFilterMode = KeyboardFilterMode.All
+ };
+ // Start the driver.
+ input.Load();
+ // Creating and starting our timer.
+ var watch = new System.Diagnostics.Stopwatch();
+ watch.Start();
+ // Creating Escape Event.
+ void EscapeHandler(object sender, KeyPressedEventArgs eventArgs)
+ {
+ if (eventArgs.Key != Keys.Escape) return;
+ input.Unload();
+ Console.WriteLine("Forced Stop!");
+ }
+ // Creating Reverse Events.
+ void Handler(object sender, MousePressedEventArgs eventArgs)
+ {
+ Console.WriteLine(eventArgs.State);
+ switch (eventArgs.State)
+ {
+ case MouseState.LeftDown:
+ eventArgs.State = MouseState.RightDown;
+ break;
+ case MouseState.LeftUp:
+ eventArgs.State = MouseState.RightUp;
+ break;
+ case MouseState.RightDown:
+ eventArgs.State = MouseState.LeftDown;
+ break;
+ case MouseState.RightUp:
+ eventArgs.State = MouseState.LeftUp;
+ break;
+ }
+ }
+ // Subscribing our events.
+ input.OnKeyPressed += EscapeHandler;
+ input.OnMousePressed += Handler;
+ // Stall the main thread until the driver is unloaded or 5 seconds have passed.
+ while (input.IsLoaded && watch.ElapsedMilliseconds <= 5000) { }
+ // Unsubscribe our events.
+ // You may not need this for every program.
+ input.OnMousePressed -= Handler;
+ input.OnKeyPressed -= EscapeHandler;
+ // Unload the driver.
+ input.Unload();
+ // Canceling our fail safe thread.
+ // The main thread will wait for all threads to end.
+ // So we need to end all threads.
+ source.Cancel();
+ Console.WriteLine("Done!");
+ }
+
+ }
+}
diff --git a/Interceptor.sln b/Interceptor.sln
index 4fd2af3..05750ff 100644
--- a/Interceptor.sln
+++ b/Interceptor.sln
@@ -1,8 +1,12 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31424.327
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interceptor", "Interceptor\Interceptor.csproj", "{C451A00E-77F1-4F3F-B7EE-27DC712EA316}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InterSwap", "InterSwap\InterSwap.csproj", "{F0138A26-5D06-4F2E-9A25-2F002598292F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -13,8 +17,15 @@ Global
{C451A00E-77F1-4F3F-B7EE-27DC712EA316}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C451A00E-77F1-4F3F-B7EE-27DC712EA316}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C451A00E-77F1-4F3F-B7EE-27DC712EA316}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F0138A26-5D06-4F2E-9A25-2F002598292F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F0138A26-5D06-4F2E-9A25-2F002598292F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F0138A26-5D06-4F2E-9A25-2F002598292F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F0138A26-5D06-4F2E-9A25-2F002598292F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A961333F-2674-4778-B44A-2F2F1C3C46B0}
+ EndGlobalSection
EndGlobal
diff --git a/Interceptor.sln.DotSettings.user b/Interceptor.sln.DotSettings.user
index 8641e71..359f934 100644
--- a/Interceptor.sln.DotSettings.user
+++ b/Interceptor.sln.DotSettings.user
@@ -1,2 +1,4 @@
- False
\ No newline at end of file
+ False
+ True
+ True
\ No newline at end of file
diff --git a/Interceptor/Input.cs b/Interceptor/Input.cs
index 141b9ba..155baca 100644
--- a/Interceptor/Input.cs
+++ b/Interceptor/Input.cs
@@ -1,37 +1,49 @@
-using System;
-using System.Collections.Generic;
+//#define WINDOWSFORM //Uncomment to enable the use of Windows form functions. (Does not work on Console apps).
+using System;
+#if WINDOWSFORM
using System.Drawing;
+using System.Windows.Forms;
+#endif
using System.Linq;
-using System.Text;
using System.Threading;
-using System.Windows.Forms;
+
+
+// ReSharper disable UnusedMember.Global
namespace Interceptor
{
public class Input
{
- private IntPtr context;
- private Thread callbackThread;
+ private IntPtr _context;
+ private Thread _callbackThread;
+ private int _mouseId = 11; // Default to 11 based on #10
+ private int _keyBoardId = 2;
///
- /// Determines whether the driver traps no keyboard events, all events, or a range of events in-between (down only, up only...etc). Set this before loading otherwise the driver will not filter any events and no keypresses can be sent.
+ /// Determines whether the driver traps no keyboard events, all events, or a range of events in-between (down only, up
+ /// only...etc). Set this before loading otherwise the driver will not filter any events and no keypresses can be sent.
///
public KeyboardFilterMode KeyboardFilterMode { get; set; }
-
+
///
- /// Determines whether the driver traps no events, all events, or a range of events in-between. Set this before loading otherwise the driver will not filter any events and no mouse clicks can be sent.
+ /// Determines whether the driver traps no events, all events, or a range of events in-between. Set this before loading
+ /// otherwise the driver will not filter any events and no mouse clicks can be sent.
///
public MouseFilterMode MouseFilterMode { get; set; }
- public bool IsLoaded { get; set; }
+ public bool IsLoaded { get; private set; }
///
- /// Gets or sets the delay in milliseconds after each key stroke down and up. Pressing a key requires both a key stroke down and up. A delay of 0 (inadvisable) may result in no keys being apparently pressed. A delay of 20 - 40 milliseconds makes the key presses visible.
+ /// Gets or sets the delay in milliseconds after each key stroke down and up. Pressing a key requires both a key stroke
+ /// down and up. A delay of 0 (inadvisable) may result in no keys being apparently pressed. A delay of 20 - 40
+ /// milliseconds makes the key presses visible.
///
public int KeyPressDelay { get; set; }
///
- /// Gets or sets the delay in milliseconds after each mouse event down and up. 'Clicking' the cursor (whether left or right) requires both a mouse event down and up. A delay of 0 (inadvisable) may result in no apparent click. A delay of 20 - 40 milliseconds makes the clicks apparent.
+ /// Gets or sets the delay in milliseconds after each mouse event down and up. 'Clicking' the cursor (whether left or
+ /// right) requires both a mouse event down and up. A delay of 0 (inadvisable) may result in no apparent click. A delay
+ /// of 20 - 40 milliseconds makes the clicks apparent.
///
public int ClickDelay { get; set; }
@@ -40,11 +52,10 @@ public class Input
public event EventHandler OnKeyPressed;
public event EventHandler OnMousePressed;
- private int deviceId; /* Very important; which device the driver sends events to */
public Input()
{
- context = IntPtr.Zero;
+ _context = IntPtr.Zero;
KeyboardFilterMode = KeyboardFilterMode.None;
MouseFilterMode = MouseFilterMode.None;
@@ -57,29 +68,31 @@ public Input()
/*
* Attempts to load the driver. You may get an error if the C++ library 'interception.dll' is not in the same folder as the executable and other DLLs. MouseFilterMode and KeyboardFilterMode must be set before Load() is called. Calling Load() twice has no effect if already loaded.
*/
+ // ReSharper disable once UnusedMember.Global
public bool Load()
{
if (IsLoaded) return false;
- context = InterceptionDriver.CreateContext();
+ _context = InterceptionDriver.CreateContext();
- if (context != IntPtr.Zero)
+ if (_context != IntPtr.Zero)
{
- callbackThread = new Thread(new ThreadStart(DriverCallback));
- callbackThread.Priority = ThreadPriority.Highest;
- callbackThread.IsBackground = true;
- callbackThread.Start();
+ _callbackThread?.Join();
+ _callbackThread = new Thread(DriverCallback)
+ {
+ Priority = ThreadPriority.Highest,
+ IsBackground = true
+ };
+ _callbackThread.Start();
IsLoaded = true;
return true;
}
- else
- {
- IsLoaded = false;
- return false;
- }
+ IsLoaded = false;
+
+ return false;
}
/*
@@ -89,34 +102,40 @@ public void Unload()
{
if (!IsLoaded) return;
- if (context != IntPtr.Zero)
- {
- callbackThread.Abort();
- InterceptionDriver.DestroyContext(context);
- IsLoaded = false;
- }
+ if (_context == IntPtr.Zero) return;
+
+ IsLoaded = false;
+ InterceptionDriver.SetFilter(_context, InterceptionDriver.IsKeyboard, (ushort) KeyboardFilterMode.All);
+ InterceptionDriver.SetFilter(_context, InterceptionDriver.IsMouse, (ushort) MouseFilterMode.All);
+ _callbackThread.Join();
+ InterceptionDriver.DestroyContext(_context);
}
private void DriverCallback()
{
- InterceptionDriver.SetFilter(context, InterceptionDriver.IsKeyboard, (Int32) KeyboardFilterMode);
- InterceptionDriver.SetFilter(context, InterceptionDriver.IsMouse, (Int32) MouseFilterMode);
+ InterceptionDriver.SetFilter(_context, InterceptionDriver.IsKeyboard, (ushort)KeyboardFilterMode);
+ InterceptionDriver.SetFilter(_context, InterceptionDriver.IsMouse, (ushort)MouseFilterMode);
- Stroke stroke = new Stroke();
-
- while (InterceptionDriver.Receive(context, deviceId = InterceptionDriver.Wait(context), ref stroke, 1) > 0)
+ var stroke = new Stroke();
+ int deviceId;
+ while (InterceptionDriver.Receive(_context, deviceId = InterceptionDriver.Wait(_context), ref stroke, 1) >
+ 0 && IsLoaded)
{
if (InterceptionDriver.IsMouse(deviceId) > 0)
{
+ _mouseId = deviceId;
if (OnMousePressed != null)
{
- var args = new MousePressedEventArgs() { X = stroke.Mouse.X, Y = stroke.Mouse.Y, State = stroke.Mouse.State, Rolling = stroke.Mouse.Rolling };
+ var args = new MousePressedEventArgs
+ {
+ X = stroke.Mouse.X,
+ Y = stroke.Mouse.Y,
+ State = stroke.Mouse.State,
+ Rolling = stroke.Mouse.Rolling
+ };
OnMousePressed(this, args);
- if (args.Handled)
- {
- continue;
- }
+ if (args.Handled) continue;
stroke.Mouse.X = args.X;
stroke.Mouse.Y = args.Y;
stroke.Mouse.State = args.State;
@@ -126,45 +145,47 @@ private void DriverCallback()
if (InterceptionDriver.IsKeyboard(deviceId) > 0)
{
+ _keyBoardId = deviceId;
if (OnKeyPressed != null)
{
- var args = new KeyPressedEventArgs() { Key = stroke.Key.Code, State = stroke.Key.State};
+ var args = new KeyPressedEventArgs {Key = stroke.Key.Code, State = stroke.Key.State};
OnKeyPressed(this, args);
- if (args.Handled)
- {
- continue;
- }
+ if (args.Handled) continue;
stroke.Key.Code = args.Key;
stroke.Key.State = args.State;
}
}
- InterceptionDriver.Send(context, deviceId, ref stroke, 1);
+ InterceptionDriver.Send(_context, deviceId, ref stroke, 1);
}
-
+ if (!IsLoaded)
+ return;
Unload();
throw new Exception("Interception.Receive() failed for an unknown reason. The driver has been unloaded.");
}
public void SendKey(Keys key, KeyState state)
{
- Stroke stroke = new Stroke();
- KeyStroke keyStroke = new KeyStroke();
+ var stroke = new Stroke();
+ var keyStroke = new KeyStroke
+ {
+ Code = key,
+ State = state
+ };
- keyStroke.Code = key;
- keyStroke.State = state;
stroke.Key = keyStroke;
- InterceptionDriver.Send(context, deviceId, ref stroke, 1);
+ InterceptionDriver.Send(_context, _keyBoardId, ref stroke, 1);
if (KeyPressDelay > 0)
Thread.Sleep(KeyPressDelay);
}
///
- /// Warning: Do not use this overload of SendKey() for non-letter, non-number, or non-ENTER keys. It may require a special KeyState of not KeyState.Down or KeyState.Up, but instead KeyState.E0 and KeyState.E1.
+ /// Warning: Do not use this overload of SendKey() for non-letter, non-number, or non-ENTER keys. It may require a
+ /// special KeyState of not KeyState.Down or KeyState.Up, but instead KeyState.E0 and KeyState.E1.
///
public void SendKey(Keys key)
{
@@ -178,169 +199,165 @@ public void SendKey(Keys key)
public void SendKeys(params Keys[] keys)
{
- foreach (Keys key in keys)
- {
- SendKey(key);
- }
+ foreach (var key in keys) SendKey(key);
}
///
- /// Warning: Only use this overload for sending letters, numbers, and symbols (those to the right of the letters on a U.S. keyboard and those obtained by pressing shift-#). Do not send special keys like Tab or Control or Enter.
+ /// Warning: Only use this overload for sending letters, numbers, and symbols (those to the right of the letters on a
+ /// U.S. keyboard and those obtained by pressing shift-#). Do not send special keys like Tab or Control or Enter.
///
///
public void SendText(string text)
{
- foreach (char letter in text)
+ foreach (var tuple in text.Select(CharacterToKeysEnum))
{
- var tuple = CharacterToKeysEnum(letter);
-
- if (tuple.Item2 == true) // We need to press shift to get the next character
+ if (tuple.Item2) // We need to press shift to get the next character
SendKey(Keys.LeftShift, KeyState.Down);
SendKey(tuple.Item1);
- if (tuple.Item2 == true)
+ if (tuple.Item2)
SendKey(Keys.LeftShift, KeyState.Up);
}
}
///
- /// Converts a character to a Keys enum and a 'do we need to press shift'.
+ /// Converts a character to a Keys enum and a 'do we need to press shift'.
///
- private Tuple CharacterToKeysEnum(char c)
+ private static Tuple CharacterToKeysEnum(char c)
{
- switch (Char.ToLower(c))
+ switch (char.ToLower(c))
{
case 'a':
- return new Tuple(Keys.A, false);
+ return new Tuple(Keys.A, false);
case 'b':
- return new Tuple(Keys.B, false);
+ return new Tuple(Keys.B, false);
case 'c':
- return new Tuple(Keys.C, false);
+ return new Tuple(Keys.C, false);
case 'd':
- return new Tuple(Keys.D, false);
+ return new Tuple(Keys.D, false);
case 'e':
- return new Tuple(Keys.E, false);
+ return new Tuple(Keys.E, false);
case 'f':
- return new Tuple(Keys.F, false);
+ return new Tuple(Keys.F, false);
case 'g':
- return new Tuple(Keys.G, false);
+ return new Tuple(Keys.G, false);
case 'h':
- return new Tuple(Keys.H, false);
+ return new Tuple(Keys.H, false);
case 'i':
- return new Tuple(Keys.I, false);
+ return new Tuple(Keys.I, false);
case 'j':
- return new Tuple(Keys.J, false);
+ return new Tuple(Keys.J, false);
case 'k':
- return new Tuple(Keys.K, false);
+ return new Tuple(Keys.K, false);
case 'l':
- return new Tuple(Keys.L, false);
+ return new Tuple(Keys.L, false);
case 'm':
- return new Tuple(Keys.M, false);
+ return new Tuple(Keys.M, false);
case 'n':
- return new Tuple(Keys.N, false);
+ return new Tuple(Keys.N, false);
case 'o':
- return new Tuple(Keys.O, false);
+ return new Tuple(Keys.O, false);
case 'p':
- return new Tuple(Keys.P, false);
+ return new Tuple(Keys.P, false);
case 'q':
- return new Tuple(Keys.Q, false);
+ return new Tuple(Keys.Q, false);
case 'r':
- return new Tuple(Keys.R, false);
+ return new Tuple(Keys.R, false);
case 's':
- return new Tuple(Keys.S, false);
+ return new Tuple(Keys.S, false);
case 't':
- return new Tuple(Keys.T, false);
+ return new Tuple(Keys.T, false);
case 'u':
- return new Tuple(Keys.U, false);
+ return new Tuple(Keys.U, false);
case 'v':
- return new Tuple(Keys.V, false);
+ return new Tuple(Keys.V, false);
case 'w':
- return new Tuple(Keys.W, false);
+ return new Tuple(Keys.W, false);
case 'x':
- return new Tuple(Keys.X, false);
+ return new Tuple(Keys.X, false);
case 'y':
- return new Tuple(Keys.Y, false);
+ return new Tuple(Keys.Y, false);
case 'z':
- return new Tuple(Keys.Z, false);
+ return new Tuple(Keys.Z, false);
case '1':
- return new Tuple(Keys.One, false);
+ return new Tuple(Keys.One, false);
case '2':
- return new Tuple(Keys.Two, false);
+ return new Tuple(Keys.Two, false);
case '3':
- return new Tuple(Keys.Three, false);
+ return new Tuple(Keys.Three, false);
case '4':
- return new Tuple(Keys.Four, false);
+ return new Tuple(Keys.Four, false);
case '5':
- return new Tuple(Keys.Five, false);
+ return new Tuple(Keys.Five, false);
case '6':
- return new Tuple(Keys.Six, false);
+ return new Tuple(Keys.Six, false);
case '7':
- return new Tuple(Keys.Seven, false);
+ return new Tuple(Keys.Seven, false);
case '8':
- return new Tuple(Keys.Eight, false);
+ return new Tuple(Keys.Eight, false);
case '9':
- return new Tuple(Keys.Nine, false);
+ return new Tuple(Keys.Nine, false);
case '0':
- return new Tuple(Keys.Zero, false);
+ return new Tuple(Keys.Zero, false);
case '-':
- return new Tuple(Keys.DashUnderscore, false);
+ return new Tuple(Keys.DashUnderscore, false);
case '+':
- return new Tuple(Keys.PlusEquals, false);
+ return new Tuple(Keys.PlusEquals, false);
case '[':
- return new Tuple(Keys.OpenBracketBrace, false);
+ return new Tuple(Keys.OpenBracketBrace, false);
case ']':
- return new Tuple(Keys.CloseBracketBrace, false);
+ return new Tuple(Keys.CloseBracketBrace, false);
case ';':
- return new Tuple(Keys.SemicolonColon, false);
+ return new Tuple(Keys.SemicolonColon, false);
case '\'':
- return new Tuple(Keys.SingleDoubleQuote, false);
+ return new Tuple(Keys.SingleDoubleQuote, false);
case ',':
- return new Tuple(Keys.CommaLeftArrow, false);
+ return new Tuple(Keys.CommaLeftArrow, false);
case '.':
- return new Tuple(Keys.PeriodRightArrow, false);
+ return new Tuple(Keys.PeriodRightArrow, false);
case '/':
- return new Tuple(Keys.ForwardSlashQuestionMark, false);
+ return new Tuple(Keys.ForwardSlashQuestionMark, false);
case '{':
- return new Tuple(Keys.OpenBracketBrace, true);
+ return new Tuple(Keys.OpenBracketBrace, true);
case '}':
- return new Tuple(Keys.CloseBracketBrace, true);
+ return new Tuple(Keys.CloseBracketBrace, true);
case ':':
- return new Tuple(Keys.SemicolonColon, true);
+ return new Tuple(Keys.SemicolonColon, true);
case '\"':
- return new Tuple(Keys.SingleDoubleQuote, true);
+ return new Tuple(Keys.SingleDoubleQuote, true);
case '<':
- return new Tuple(Keys.CommaLeftArrow, true);
+ return new Tuple(Keys.CommaLeftArrow, true);
case '>':
- return new Tuple(Keys.PeriodRightArrow, true);
+ return new Tuple(Keys.PeriodRightArrow, true);
case '?':
- return new Tuple(Keys.ForwardSlashQuestionMark, true);
+ return new Tuple(Keys.ForwardSlashQuestionMark, true);
case '\\':
- return new Tuple(Keys.BackslashPipe, false);
+ return new Tuple(Keys.BackslashPipe, false);
case '|':
- return new Tuple(Keys.BackslashPipe, true);
+ return new Tuple(Keys.BackslashPipe, true);
case '`':
- return new Tuple(Keys.Tilde, false);
+ return new Tuple(Keys.Tilde, false);
case '~':
- return new Tuple(Keys.Tilde, true);
+ return new Tuple(Keys.Tilde, true);
case '!':
- return new Tuple(Keys.One, true);
+ return new Tuple(Keys.One, true);
case '@':
- return new Tuple(Keys.Two, true);
+ return new Tuple(Keys.Two, true);
case '#':
- return new Tuple(Keys.Three, true);
+ return new Tuple(Keys.Three, true);
case '$':
- return new Tuple(Keys.Four, true);
+ return new Tuple(Keys.Four, true);
case '%':
- return new Tuple(Keys.Five, true);
+ return new Tuple(Keys.Five, true);
case '^':
- return new Tuple(Keys.Six, true);
+ return new Tuple(Keys.Six, true);
case '&':
- return new Tuple(Keys.Seven, true);
+ return new Tuple(Keys.Seven, true);
case '*':
- return new Tuple(Keys.Eight, true);
+ return new Tuple(Keys.Eight, true);
case '(':
- return new Tuple(Keys.Nine, true);
+ return new Tuple(Keys.Nine, true);
case ')':
return new Tuple(Keys.Zero, true);
case ' ':
@@ -352,23 +369,17 @@ private Tuple CharacterToKeysEnum(char c)
public void SendMouseEvent(MouseState state)
{
- Stroke stroke = new Stroke();
- MouseStroke mouseStroke = new MouseStroke();
+ var stroke = new Stroke();
+ var mouseStroke = new MouseStroke { State = state };
- mouseStroke.State = state;
if (state == MouseState.ScrollUp)
- {
mouseStroke.Rolling = 120;
- }
- else if (state == MouseState.ScrollDown)
- {
- mouseStroke.Rolling = -120;
- }
+ else if (state == MouseState.ScrollDown) mouseStroke.Rolling = -120;
stroke.Mouse = mouseStroke;
- InterceptionDriver.Send(context, 12, ref stroke, 1);
+ InterceptionDriver.Send(_context, _mouseId, ref stroke, 1);
}
public void SendLeftClick()
@@ -388,7 +399,7 @@ public void SendRightClick()
public void ScrollMouse(ScrollDirection direction)
{
switch (direction)
- {
+ {
case ScrollDirection.Down:
SendMouseEvent(MouseState.ScrollDown);
break;
@@ -399,52 +410,75 @@ public void ScrollMouse(ScrollDirection direction)
}
///
- /// Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to get the current cursor's position, calculates the desired destination's offset, and uses the Win32 API to set the cursor to the new position.
+ /// Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable
+ /// vectors. An alternate version uses the standard Win32 API to get the current cursor's position, calculates the
+ /// desired destination's offset, and uses the Win32 API to set the cursor to the new position.
///
- public void MoveMouseBy(int deltaX, int deltaY, bool useDriver = false)
+#if WINDOWSFORM
+#warning Use of none Interception Driver enable!
+ public void MoveMouseBy(int deltaX, int deltaY, bool useDriver = true)
{
if (useDriver)
+#else
+ public void MoveMouseBy(int deltaX, int deltaY)
+ {
+#endif
{
- Stroke stroke = new Stroke();
- MouseStroke mouseStroke = new MouseStroke();
-
- mouseStroke.X = deltaX;
- mouseStroke.Y = deltaY;
+ var stroke = new Stroke();
+ var mouseStroke = new MouseStroke
+ {
+ X = deltaX,
+ Y = deltaY
+ };
stroke.Mouse = mouseStroke;
stroke.Mouse.Flags = MouseFlags.MoveRelative;
- InterceptionDriver.Send(context, 12, ref stroke, 1);
+ InterceptionDriver.Send(_context, _mouseId, ref stroke, 1);
}
+#if WINDOWSFORM
+#warning Use of none Interception Driver enable!
else
{
var currentPos = Cursor.Position;
- Cursor.Position = new Point(currentPos.X + deltaX, currentPos.Y - deltaY); // Coordinate system for y: 0 begins at top, and bottom of screen has the largest number
+ Cursor.Position =
+ new Point(currentPos.X + deltaX,
+ currentPos.Y -
+ deltaY); // Coordinate system for y: 0 begins at top, and bottom of screen has the largest number
}
+#endif
}
///
- /// Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable vectors. An alternate version uses the standard Win32 API to set the cursor's position and does not use the driver.
+ /// Warning: This function, if using the driver, does not function reliably and often moves the mouse in unpredictable
+ /// vectors. An alternate version uses the standard Win32 API to set the cursor's position and does not use the driver.
///
- public void MoveMouseTo(int x, int y, bool useDriver = false)
+#if WINDOWSFORM
+#warning Use of none Interception Driver enable!
+ public void MoveMouseTo(int x, int y, bool useDriver = true)
{
if (useDriver)
+#else
+ public void MoveMouseTo(int x, int y)
+ {
+#endif
{
- Stroke stroke = new Stroke();
- MouseStroke mouseStroke = new MouseStroke();
+ var stroke = new Stroke();
+ var mouseStroke = new MouseStroke { X = x, Y = y };
- mouseStroke.X = x;
- mouseStroke.Y = y;
stroke.Mouse = mouseStroke;
stroke.Mouse.Flags = MouseFlags.MoveAbsolute;
- InterceptionDriver.Send(context, 12, ref stroke, 1);
+ InterceptionDriver.Send(_context, _mouseId, ref stroke, 1);
}
+#if WINDOWSFORM
+#warning Use of none Interception Driver enable!
+ else
{
Cursor.Position = new Point(x, y);
}
+#endif
}
}
-}
-
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/Interceptor/InterceptionDriver.cs b/Interceptor/InterceptionDriver.cs
index e5c0257..5a5eca9 100644
--- a/Interceptor/InterceptionDriver.cs
+++ b/Interceptor/InterceptionDriver.cs
@@ -1,8 +1,6 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Runtime.InteropServices;
-using System.Text;
+// ReSharper disable UnusedMember.Global
namespace Interceptor
{
@@ -38,6 +36,7 @@ public enum KeyboardFilterMode : ushort
[Flags]
public enum MouseState : ushort
{
+ Moving = 0x00,
LeftDown = 0x01,
LeftUp = 0x02,
RightDown = 0x04,
@@ -53,7 +52,7 @@ public enum MouseState : ushort
ScrollDown = 0x400,
ScrollHorizontal = 0x800,
ScrollLeft = 0x800,
- ScrollRight = 0x800,
+ ScrollRight = 0x800
}
[Flags]
@@ -73,7 +72,7 @@ public enum MouseFilterMode : ushort
RightExtraUp = 0x200,
MouseWheelVertical = 0x400,
MouseWheelHorizontal = 0x800,
- MouseMove = 0x1000,
+ MouseMove = 0x1000
}
[Flags]
@@ -92,18 +91,18 @@ public struct MouseStroke
{
public MouseState State;
public MouseFlags Flags;
- public Int16 Rolling;
- public Int32 X;
- public Int32 Y;
- public UInt16 Information;
- }
+ public short Rolling;
+ public int X;
+ public int Y;
+ public uint Information;
+ }
[StructLayout(LayoutKind.Sequential)]
public struct KeyStroke
{
public Keys Code;
public KeyState State;
- public UInt32 Information;
+ public uint Information;
}
[StructLayout(LayoutKind.Explicit)]
@@ -115,50 +114,73 @@ public struct Stroke
}
///
- /// The .NET wrapper class around the C++ library interception.dll.
+ /// The .NET wrapper class around the C++ library interception.dll.
///
public static class InterceptionDriver
{
- [DllImport("interception.dll", EntryPoint = "interception_create_context", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("interception.dll", EntryPoint = "interception_create_context",
+ CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr CreateContext();
- [DllImport("interception.dll", EntryPoint = "interception_destroy_context", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("interception.dll", EntryPoint = "interception_destroy_context",
+ CallingConvention = CallingConvention.Cdecl)]
public static extern void DestroyContext(IntPtr context);
- [DllImport("interception.dll", EntryPoint = "interception_get_precedence", CallingConvention = CallingConvention.Cdecl)]
- public static extern void GetPrecedence(IntPtr context, Int32 device);
+ [DllImport("interception.dll", EntryPoint = "interception_get_precedence",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern void GetPrecedence(IntPtr context, int device);
- [DllImport("interception.dll", EntryPoint = "interception_set_precedence", CallingConvention = CallingConvention.Cdecl)]
- public static extern void SetPrecedence(IntPtr context, Int32 device, Int32 Precedence);
+ [DllImport("interception.dll", EntryPoint = "interception_set_precedence",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetPrecedence(IntPtr context, int device, int precedence);
- [DllImport("interception.dll", EntryPoint = "interception_get_filter", CallingConvention = CallingConvention.Cdecl)]
- public static extern void GetFilter(IntPtr context, Int32 device);
+ [DllImport("interception.dll", EntryPoint = "interception_get_filter",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern ushort GetFilter(IntPtr context, int device);
- [DllImport("interception.dll", EntryPoint = "interception_set_filter", CallingConvention = CallingConvention.Cdecl)]
- public static extern void SetFilter(IntPtr context, Predicate predicate, Int32 keyboardFilterMode);
+ [DllImport("interception.dll", EntryPoint = "interception_set_filter",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetFilter(IntPtr context, Predicate predicate, ushort keyboardFilterMode);
[DllImport("interception.dll", EntryPoint = "interception_wait", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 Wait(IntPtr context);
+ public static extern int Wait(IntPtr context);
- [DllImport("interception.dll", EntryPoint = "interception_wait_with_timeout", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 WaitWithTimeout(IntPtr context, UInt64 milliseconds);
+ [DllImport("interception.dll", EntryPoint = "interception_wait_with_timeout",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern int WaitWithTimeout(IntPtr context, ulong milliseconds);
[DllImport("interception.dll", EntryPoint = "interception_send", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 Send(IntPtr context, Int32 device, ref Stroke stroke, UInt32 numStrokes);
-
- [DllImport("interception.dll", EntryPoint = "interception_receive", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 Receive(IntPtr context, Int32 device, ref Stroke stroke, UInt32 numStrokes);
-
- [DllImport("interception.dll", EntryPoint = "interception_get_hardware_id", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 GetHardwareId(IntPtr context, Int32 device, String hardwareIdentifier, UInt32 sizeOfString);
-
- [DllImport("interception.dll", EntryPoint = "interception_is_invalid", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 IsInvalid(Int32 device);
-
- [DllImport("interception.dll", EntryPoint = "interception_is_keyboard", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 IsKeyboard(Int32 device);
-
- [DllImport("interception.dll", EntryPoint = "interception_is_mouse", CallingConvention = CallingConvention.Cdecl)]
- public static extern Int32 IsMouse(Int32 device);
+ public static extern int Send(IntPtr context, int device, ref Stroke stroke, uint numStrokes);
+
+ [DllImport("interception.dll", EntryPoint = "interception_receive",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern int Receive(IntPtr context, int device, ref Stroke stroke, uint numStrokes);
+
+ [DllImport("interception.dll", EntryPoint = "interception_get_hardware_id",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern int GetHardwareId(IntPtr context, int device, string hardwareIdentifier,
+ uint sizeOfString);
+
+ [DllImport("interception.dll", EntryPoint = "interception_is_invalid",
+ CallingConvention = CallingConvention.Cdecl)]
+ public static extern int IsInvalid(int device);
+
+ [DllImport("interception.dll", EntryPoint = "interception_is_keyboard",
+ CallingConvention = CallingConvention.Cdecl)]
+ private static extern int _IsKeyboard(int device);
+
+ public static int IsKeyboard(int device)
+ {
+ return _IsKeyboard(device);
+ }
+
+ [DllImport("interception.dll", EntryPoint = "interception_is_mouse",
+ CallingConvention = CallingConvention.Cdecl)]
+ private static extern int _IsMouse(int device);
+
+ public static int IsMouse(int device)
+ {
+ return _IsMouse(device);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Interceptor/Interceptor.csproj b/Interceptor/Interceptor.csproj
index 801c838..ceed7ab 100644
--- a/Interceptor/Interceptor.csproj
+++ b/Interceptor/Interceptor.csproj
@@ -21,7 +21,7 @@
DEBUG;TRACE
prompt
4
- x64
+ AnyCPU
pdbonly
diff --git a/Interceptor/KeyPressedEventArgs.cs b/Interceptor/KeyPressedEventArgs.cs
index 754cda1..ad07587 100644
--- a/Interceptor/KeyPressedEventArgs.cs
+++ b/Interceptor/KeyPressedEventArgs.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
namespace Interceptor
{
diff --git a/Interceptor/Keys.cs b/Interceptor/Keys.cs
index ef33e14..1500e1d 100644
--- a/Interceptor/Keys.cs
+++ b/Interceptor/Keys.cs
@@ -1,14 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+// ReSharper disable UnusedMember.Global
namespace Interceptor
{
///
- /// A list of scancodes.
+ /// A list of scan-codes.
///
- /// Scancodes change according to keyboard layout...so this may be inaccurate.
+ /// Scan-codes change according to keyboard layout...so this may be inaccurate.
public enum Keys : ushort
{
Escape = 1,
@@ -110,6 +107,6 @@ public enum Keys : ushort
NumpadDelete = 83,
NumpadEnter = 28,
NumpadPlus = 78,
- NumpadMinus = 74,
+ NumpadMinus = 74
}
-}
+}
\ No newline at end of file
diff --git a/Interceptor/MousePressedEventArgs.cs b/Interceptor/MousePressedEventArgs.cs
index 8884535..47d3701 100644
--- a/Interceptor/MousePressedEventArgs.cs
+++ b/Interceptor/MousePressedEventArgs.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
namespace Interceptor
{
diff --git a/Interceptor/Properties/AssemblyInfo.cs b/Interceptor/Properties/AssemblyInfo.cs
index 6dab51e..830a9a8 100644
--- a/Interceptor/Properties/AssemblyInfo.cs
+++ b/Interceptor/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
diff --git a/Interceptor/ScrollDirection.cs b/Interceptor/ScrollDirection.cs
index 2e3f4aa..31b289d 100644
--- a/Interceptor/ScrollDirection.cs
+++ b/Interceptor/ScrollDirection.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Interceptor
+namespace Interceptor
{
public enum ScrollDirection
{
diff --git a/Interceptor/bin/Debug/Interceptor.dll b/Interceptor/bin/Debug/Interceptor.dll
deleted file mode 100644
index e2f9737..0000000
Binary files a/Interceptor/bin/Debug/Interceptor.dll and /dev/null differ
diff --git a/Interceptor/bin/Debug/Interceptor.pdb b/Interceptor/bin/Debug/Interceptor.pdb
deleted file mode 100644
index 451d6da..0000000
Binary files a/Interceptor/bin/Debug/Interceptor.pdb and /dev/null differ
diff --git a/Interceptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Interceptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 8aa715f..0000000
Binary files a/Interceptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Interceptor/obj/Debug/Interceptor.csproj.FileListAbsolute.txt b/Interceptor/obj/Debug/Interceptor.csproj.FileListAbsolute.txt
deleted file mode 100644
index fdc027a..0000000
--- a/Interceptor/obj/Debug/Interceptor.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-C:\Users\Jason\Documents\Programming\Projects\C#\Enterprise\Interceptor\Interceptor\obj\Debug\ResolveAssemblyReference.cache
-C:\Users\Jason\Documents\Programming\Projects\C#\Enterprise\Interceptor\Interceptor\bin\Debug\Interceptor.dll
-C:\Users\Jason\Documents\Programming\Projects\C#\Enterprise\Interceptor\Interceptor\bin\Debug\Interceptor.pdb
-C:\Users\Jason\Documents\Programming\Projects\C#\Enterprise\Interceptor\Interceptor\obj\Debug\Interceptor.dll
-C:\Users\Jason\Documents\Programming\Projects\C#\Enterprise\Interceptor\Interceptor\obj\Debug\Interceptor.pdb
-D:\Code\Interceptor\Interceptor\obj\Debug\Interceptor.csprojResolveAssemblyReference.cache
-D:\Code\Interceptor\Interceptor\obj\Debug\Interceptor.dll
-D:\Code\Interceptor\Interceptor\bin\Debug\Interceptor.dll
-D:\Code\Interceptor\Interceptor\bin\Debug\Interceptor.pdb
-D:\Code\Interceptor\Interceptor\obj\Debug\Interceptor.pdb
diff --git a/Interceptor/obj/Debug/Interceptor.csprojResolveAssemblyReference.cache b/Interceptor/obj/Debug/Interceptor.csprojResolveAssemblyReference.cache
deleted file mode 100644
index 375792e..0000000
Binary files a/Interceptor/obj/Debug/Interceptor.csprojResolveAssemblyReference.cache and /dev/null differ
diff --git a/Interceptor/obj/Debug/Interceptor.dll b/Interceptor/obj/Debug/Interceptor.dll
deleted file mode 100644
index e2f9737..0000000
Binary files a/Interceptor/obj/Debug/Interceptor.dll and /dev/null differ
diff --git a/Interceptor/obj/Debug/Interceptor.pdb b/Interceptor/obj/Debug/Interceptor.pdb
deleted file mode 100644
index 451d6da..0000000
Binary files a/Interceptor/obj/Debug/Interceptor.pdb and /dev/null differ