diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96374c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/HookProcDLL/HookProcDLL.sln b/HookProcDLL/HookProcDLL.sln new file mode 100644 index 0000000..ea73df1 --- /dev/null +++ b/HookProcDLL/HookProcDLL.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SetHooksClassLibrary", "SetHooksClassLibrary\SetHooksClassLibrary.vcxproj", "{8424E327-0206-47AB-A3BD-A85A864A2CBD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HookProcDLL", "HookProcDLL\HookProc DLL.vcxproj", "{5A8C2462-C8F7-4CD6-B673-58CFD2C720B5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8424E327-0206-47AB-A3BD-A85A864A2CBD}.Debug|Win32.ActiveCfg = Debug|Win32 + {8424E327-0206-47AB-A3BD-A85A864A2CBD}.Debug|Win32.Build.0 = Debug|Win32 + {8424E327-0206-47AB-A3BD-A85A864A2CBD}.Release|Win32.ActiveCfg = Release|Win32 + {8424E327-0206-47AB-A3BD-A85A864A2CBD}.Release|Win32.Build.0 = Release|Win32 + {5A8C2462-C8F7-4CD6-B673-58CFD2C720B5}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A8C2462-C8F7-4CD6-B673-58CFD2C720B5}.Debug|Win32.Build.0 = Debug|Win32 + {5A8C2462-C8F7-4CD6-B673-58CFD2C720B5}.Release|Win32.ActiveCfg = Release|Win32 + {5A8C2462-C8F7-4CD6-B673-58CFD2C720B5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/HookProcDLL/HookProcDLL.suo b/HookProcDLL/HookProcDLL.suo new file mode 100644 index 0000000..ebbe6ec Binary files /dev/null and b/HookProcDLL/HookProcDLL.suo differ diff --git a/HookProcDLL/HookProcDLL.v12.suo b/HookProcDLL/HookProcDLL.v12.suo new file mode 100644 index 0000000..3479581 Binary files /dev/null and b/HookProcDLL/HookProcDLL.v12.suo differ diff --git a/HookProcDLL/HookProcDLL/HookClass.cpp b/HookProcDLL/HookProcDLL/HookClass.cpp new file mode 100644 index 0000000..cfea368 --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookClass.cpp @@ -0,0 +1,136 @@ +#include "stdafx.h" +#include "HookClass.h" + +namespace HookDLL +{ + + //The error checking procedures take an integer that will help with debugging, it is only a temporary measure. + HookClass::HookClass() + { + dllHandle = ::LoadLibrary(HOOK_DLL_NAME2); + if(!dllHandle) + { + std::cerr << "Load Lib fail." << std::endl; + throw std::exception("Load library failure."); + } + + HOOKPROC keyProc = (HOOKPROC)::GetProcAddress(dllHandle, "keyboardHookProcedure"); + HOOKPROC proc = (HOOKPROC)::GetProcAddress(dllHandle, "mouseHookProcedure"); + int err = CheckHookProc(proc, 2); + int err2 = CheckHookProc(keyProc, 3); + + if(err != 0 || err2 != 0) + { + //Cleanup + CleanupLibraries(); + throw std::exception("Get proc addresses failure."); + } + + + std::cout << "Located mouse proc.\nSetting hook." << std::endl; + hooks.push_back(::SetWindowsHookExA(WH_MOUSE_LL, proc, dllHandle, NULL)); + std::cout << "Located keyboard proc.\nSetting hook." << std::endl; + hooks.push_back(::SetWindowsHookExA(WH_KEYBOARD_LL, keyProc, dllHandle, NULL)); + + + err = CheckHook(hooks[0], 3); + err2 = CheckHook(hooks[1], 4); + + if(err != 0 || err2 != 0) + { + CleanupHooks(hooks, this->hookCount); + CleanupLibraries(); + throw std::exception("Set hooks failure."); + } + + std::cout << "\nAll hooks set.\n"; + } + + HookClass::HookClass(bool kbd, bool mse) + { + throw std::string("unfinished"); + dllHandle = NULL; + dllHandle = ::LoadLibrary(HOOK_DLL_NAME); + if(!dllHandle) + { + std::cerr << "Load Lib fail." << std::endl; + throw std::exception("Load library failure."); + } + + HOOKPROC keyProc = (HOOKPROC)::GetProcAddress(dllHandle, "keyboardHookProcedure"); + int err2 = CheckHookProc(keyProc, 3); + if(err2 != 0) + { + //Cleanup + CleanupLibraries(); + throw std::exception("Get proc addresses failure."); + } + std::cout << "Located keyboard proc.\nSetting hook." << std::endl; + hooks.push_back(::SetWindowsHookExA(WH_KEYBOARD_LL, keyProc, dllHandle, NULL)); + + HOOKPROC proc = (HOOKPROC)::GetProcAddress(dllHandle, "mouseHookProcedure"); + int err = CheckHookProc(proc, 2); + + + std::cout << "Located mouse proc.\nSetting hook." << std::endl; + hooks.push_back(::SetWindowsHookExA(WH_MOUSE_LL, proc, dllHandle, NULL)); + + + err = CheckHook(hooks[0], 3); + err2 = CheckHook(hooks[1], 4); + + if(err != 0 || err2 != 0) + { + CleanupHooks(hooks, this->hookCount); + CleanupLibraries(); + throw std::exception("Set hooks failure."); + } + + std::cout << "\nAll hooks set.\n"; + } + HookClass::~HookClass() + { + CleanupHooks(hooks,hookCount); + CleanupLibraries(); + } + + int HookClass::CheckHookProc(HOOKPROC proc, int ret) + { + if(!proc) + { + std::cerr << "Last error: " << ::GetLastError() << std::endl; + std::cerr << "Get proc addr fail." << std::endl; + return ret; + } + return 0; + } + + + int HookClass::CheckHook(HHOOK hook, int ret) + { + if(!hook) + { + std::cerr << "Last error: " << ::GetLastError() << std::endl; + std::cerr << "Set hook fail." << std::endl; + return ret; + } + return 0; + } + void HookClass::CleanupHooks(std::vector hooks, size_t size = hookCount) + { + BOOL ret = FALSE; + for(size_t i = 0; i < size; i++) + { + ret = ::UnhookWindowsHookEx(hooks[i]); + if(ret) + std::cerr << "Hook unhooked." << std::endl; + else + std::cerr << "Hook ALREADY unhooked." << std::endl; + } + } + void HookClass::CleanupLibraries() + { + FreeLibrary(dllHandle); + } + +} \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/HookClass.h b/HookProcDLL/HookProcDLL/HookClass.h new file mode 100644 index 0000000..9e1ec4a --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookClass.h @@ -0,0 +1,28 @@ +#pragma once +#include "stdafx.h" +#include + + +namespace HookDLL +{ + + + class HookClass + { + const char *HOOK_DLL_NAME2 = "HookProcDLL.dll"; + static const int hookCount = 2; + HMODULE dllHandle; + std::vector hooks; + protected: + int CheckHookProc(HOOKPROC proc, int ret); + int CheckHook(HHOOK hook, int ret); + void CleanupHooks(std::vector hooks, size_t size); + void CleanupLibraries(); + public: + /// Constructor, loads hook DLL and will report error. + HookClass(); + HookClass(bool kbd, bool mse); + ~HookClass(); + }; + +} \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj new file mode 100644 index 0000000..93b1a6f --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj @@ -0,0 +1,103 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5A8C2462-C8F7-4CD6-B673-58CFD2C720B5} + Win32Proj + HookProcDLL + HookProcDLL + + + + DynamicLibrary + true + Unicode + v120 + + + DynamicLibrary + false + true + NotSet + v120 + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKPROCDLL_EXPORTS;%(PreprocessorDefinitions) + StdCall + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKPROCDLL_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + false + + + false + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.filters b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.filters new file mode 100644 index 0000000..aed2826 --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.user b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookProc DLL.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/HookProcDLL.cpp b/HookProcDLL/HookProcDLL/HookProcDLL.cpp new file mode 100644 index 0000000..7648aa7 --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookProcDLL.cpp @@ -0,0 +1,14 @@ +// HookProc DLL.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" +#include "HookProcDLL.h" + + +HOOKPROCDLL_API LRESULT hookProcedure(int code, WPARAM wParam, LPARAM lParam) +{ + MSLLHOOKSTRUCT *s = (MSLLHOOKSTRUCT*)lParam; + s->flags &= LLMHF_INJECTED; + + return CallNextHookEx(NULL, code, wParam, lParam); +} diff --git a/HookProcDLL/HookProcDLL/HookProcDLL.h b/HookProcDLL/HookProcDLL/HookProcDLL.h new file mode 100644 index 0000000..7b29d36 --- /dev/null +++ b/HookProcDLL/HookProcDLL/HookProcDLL.h @@ -0,0 +1,13 @@ +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the HOOKPROCDLL_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// HOOKPROCDLL_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. +#ifdef HOOKPROCDLL_EXPORTS +#define HOOKPROCDLL_API __declspec(dllexport) +#else +#define HOOKPROCDLL_API __declspec(dllimport) +#endif + +HOOKPROCDLL_API LRESULT hookProcedure(int code, WPARAM wParam, LPARAM lParam); diff --git a/HookProcDLL/HookProcDLL/ReadMe.txt b/HookProcDLL/HookProcDLL/ReadMe.txt new file mode 100644 index 0000000..a16a605 --- /dev/null +++ b/HookProcDLL/HookProcDLL/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + DYNAMIC LINK LIBRARY : HookProc DLL Project Overview +======================================================================== + +AppWizard has created this HookProc DLL DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your HookProc DLL application. + + +HookProc DLL.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +HookProc DLL.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +HookProc DLL.cpp + This is the main DLL source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named HookProc DLL.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/HookProcDLL/HookProcDLL/SendKey.h b/HookProcDLL/HookProcDLL/SendKey.h new file mode 100644 index 0000000..48d9ca9 --- /dev/null +++ b/HookProcDLL/HookProcDLL/SendKey.h @@ -0,0 +1,138 @@ +// Caleb Taylor 2015 +// Small helper class for simulating input and doing the translation to the new alphabet. +// Used in the DLLmain function. + + +#pragma once +#include "stdafx.h" + +namespace sds +{ + class SendKey + { + //The INPUT structure is used by the Windows API function "SendInput()". + INPUT keyInput; + std::string workingAlphabet; + std::wstring newAlphabet; + + public: + //Constructor + SendKey() + { + //Initialize our working alphabet. + this->workingAlphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + this->newAlphabet = L"àƀćďĕƒğħíĵĸlmnǒpqrƨţuvwxÿzĀßCĐEFĢĦIJƘŁMNOƤQRƧŦUVWXYZ"; + //this->newAlphabet = L"4bcd3fgh1jklmn0pqr57uvwxyz4bcd3fgh1jklmn0pqr57uvwxyz"; + + memset(&keyInput,0,sizeof(INPUT)); + keyInput.type = INPUT_KEYBOARD; + } + //Simulates a hardware key-press for non-unicode characters. + void Send(int vk, bool down) + { + WORD scanCode = GetScanCode(vk); + char vkCharacter = (char)vk; + + //Find character in alphabet. + size_t ind = this->workingAlphabet.find(vkCharacter); + //If couldn't find it... + if (ind == std::string::npos) + { + return; + } + scanCode = GetScanCode(this->newAlphabet.at(ind)); + + + + //Filling in the sendinput structure. + //keyInput.ki.wVk = this->newAlphabet.at(ind); + keyInput.ki.wScan = scanCode; + keyInput.ki.dwExtraInfo = GetMessageExtraInfo(); + keyInput.ki.dwFlags = KEYEVENTF_SCANCODE ; + + + //Character is in the "KEY DOWN" state already, and the request is to send keyup. + if (!down) + { + //Character is in the "KEY DOWN" state already. + keyInput.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; + } + + UINT ret = SendInput(1,&keyInput,sizeof(INPUT)); + if (ret == 0) + { + throw std::exception("SendInput failed to send the input."); + } + //assert(ret != 0); + } + //Sends a simulated key-press for unicode characters. + void SendUnicode(int vk, bool down) + { + WORD scanCode = GetScanCode(vk); + char vkCharacter = (char)vk; + + //Find character in alphabet. + size_t ind = this->workingAlphabet.find(vkCharacter); + //If couldn't find it... + if (ind == std::string::npos) + { + return; + } + + //Filling in the sendinput structure. + keyInput.ki.wScan = this->newAlphabet.at(ind); + keyInput.ki.dwExtraInfo = GetMessageExtraInfo(); + keyInput.ki.dwFlags = KEYEVENTF_UNICODE; + + //Character is in the "KEY DOWN" state already, and the request is to send keyup. + if (!down) + { + //Character is in the "KEY DOWN" state already. + keyInput.ki.dwFlags = KEYEVENTF_UNICODE | KEYEVENTF_KEYUP; + } + + + UINT ret = SendInput(1, &keyInput, sizeof(INPUT)); + + if (ret == 0) + { + throw std::exception("SendInput failed to send the input."); + } + } + + //Determines if "int vk" is in the working alphabet, this is the english alphabet a-z and A-Z. + //Returns: true if character is in working alphabet, false otherwise. + bool IsWorkingSetCharacter(int vk) + { + char c = (char)vk; + return (this->workingAlphabet.find(c) != std::string::npos); + } + + //Updates the alphabet the English characters are translated to. + //Note: The new alphabet "wstring update" needs to be the same length as the internal workingAlphabet. + //Returns: false on update failure, true on success. + bool UpdateTranslationAlphabet(std::wstring update) + { + if (this->workingAlphabet.size() != update.size()) + return false; + this->newAlphabet = update; + return true; + + } + size_t GetWorkingAlphabetSize() const + { + return this->workingAlphabet.size(); + } + private: + //Gets the virtual scan code (VSC) for a virtual key (VK). + WORD GetScanCode(int vk) + { + WORD ret = + (MapVirtualKeyExA(VkKeyScanA(vk), MAPVK_VK_TO_VSC,GetKeyboardLayout(NULL))); + if( ret == 0 ) + ret = static_cast (MapVirtualKeyExA(vk, MAPVK_VK_TO_VSC,GetKeyboardLayout(NULL))); + + return ret; + } + }; +} \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/dllmain.cpp b/HookProcDLL/HookProcDLL/dllmain.cpp new file mode 100644 index 0000000..3e3f0d1 --- /dev/null +++ b/HookProcDLL/HookProcDLL/dllmain.cpp @@ -0,0 +1,115 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the HOOKPROCDLL_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// HOOKPROCDLL_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. +#ifdef HOOKPROCDLL_EXPORTS +#define HOOKPROCDLL_API __declspec(dllexport) +#else +#define HOOKPROCDLL_API __declspec(dllimport) +#endif + +#ifdef __cplusplus // If used by C++ code, +extern "C" +{ // we need to export the C interface +#endif + +HOOKPROCDLL_API LRESULT mouseHookProcedure(int code, WPARAM wParam, LPARAM lParam); +HOOKPROCDLL_API LRESULT keyboardHookProcedure(int code, WPARAM wParam, LPARAM lParam); +HOOKPROCDLL_API bool SetTranslationAlphabet(std::wstring str); + +#ifdef __cplusplus +} +#endif + +HHOOK hHook = 0; +sds::SendKey sender; +static bool isShiftDown = false; + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + //hHook = ::SetWindowsHookExA(WH_KEYBOARD_LL, (HOOKPROC)keyboardHookProcedure, NULL, NULL); + //if(hHook == NULL) + //MessageBox(NULL, "Sethook fail", "", MB_OK); + //break; + case DLL_THREAD_ATTACH: + + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + //UnhookWindowsHookEx(hHook); + break; + } + return TRUE; +} + +//Can be used in the future, a mouse hook procedure. +HOOKPROCDLL_API LRESULT mouseHookProcedure(int code, WPARAM wParam, LPARAM lParam) +{ + if(code < 0) + return CallNextHookEx(NULL, code, wParam, lParam); + if(code == HC_ACTION) + { + //Do stuff here. + } + + return CallNextHookEx(NULL, code, wParam, lParam); +} + +//The low level keyboard hook procedure. +HOOKPROCDLL_API LRESULT keyboardHookProcedure(int code, WPARAM wParam, LPARAM lParam) +{ + if(code < 0) + return CallNextHookEx(NULL, code, wParam, lParam); + + if(code == HC_ACTION) + { + //Retrieve information from keyboard hook structure. + PKBDLLHOOKSTRUCT kb = (PKBDLLHOOKSTRUCT)lParam; + + + if (wParam == WM_KEYDOWN) + { + //If highest order bit is set, key is down. SHORT is 2 bytes in length on this, and most machines. + isShiftDown = (GetKeyState(VK_SHIFT) & 0x1000000000000000); + + //Determine if a part of the working character set. + if (sender.IsWorkingSetCharacter(static_cast(kb->vkCode))) + { + if (isShiftDown) + sender.SendUnicode((kb->vkCode), true); + else + sender.SendUnicode(tolower(kb->vkCode), true); + return 1; // Mark input as handled by this hook. + } + } + else if (wParam == WM_KEYUP) + { + if (sender.IsWorkingSetCharacter(static_cast(kb->vkCode))) + { + if (isShiftDown) + sender.SendUnicode((kb->vkCode), false); + else + sender.SendUnicode(tolower(kb->vkCode), false); + return 1; + } + } + } + + return CallNextHookEx(NULL, code, wParam, lParam); +} + +//Updates the alphabet used for translation. +HOOKPROCDLL_API bool SetTranslationAlphabet(std::wstring str) +{ + return sender.UpdateTranslationAlphabet(str); +} \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/stdafx.cpp b/HookProcDLL/HookProcDLL/stdafx.cpp new file mode 100644 index 0000000..ae88cb7 --- /dev/null +++ b/HookProcDLL/HookProcDLL/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// HookProc DLL.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/HookProcDLL/HookProcDLL/stdafx.h b/HookProcDLL/HookProcDLL/stdafx.h new file mode 100644 index 0000000..86d24db --- /dev/null +++ b/HookProcDLL/HookProcDLL/stdafx.h @@ -0,0 +1,20 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include +#include +#include +#include + +// TODO: reference additional headers your program requires here +#include +#include +#include "SendKey.h" \ No newline at end of file diff --git a/HookProcDLL/HookProcDLL/targetver.h b/HookProcDLL/HookProcDLL/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/HookProcDLL/HookProcDLL/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/HookProcDLL/SetHooksClassLibrary/AssemblyInfo.cpp b/HookProcDLL/SetHooksClassLibrary/AssemblyInfo.cpp new file mode 100644 index 0000000..7316638 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/AssemblyInfo.cpp @@ -0,0 +1,38 @@ +#include "stdafx.h" + +using namespace System; +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; +using namespace System::Runtime::InteropServices; +using namespace System::Security::Permissions; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute(L"SetHooksClassLibrary")]; +[assembly:AssemblyDescriptionAttribute(L"")]; +[assembly:AssemblyConfigurationAttribute(L"")]; +[assembly:AssemblyCompanyAttribute(L"")]; +[assembly:AssemblyProductAttribute(L"SetHooksClassLibrary")]; +[assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2015")]; +[assembly:AssemblyTrademarkAttribute(L"")]; +[assembly:AssemblyCultureAttribute(L"")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.0.*")]; + +[assembly:ComVisible(false)]; + +[assembly:CLSCompliantAttribute(true)]; \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/HookClass.cpp b/HookProcDLL/SetHooksClassLibrary/HookClass.cpp new file mode 100644 index 0000000..229abb1 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/HookClass.cpp @@ -0,0 +1,145 @@ +#pragma once +#include "stdafx.h" +#include "HookClass.h" + +namespace HookDLL +{ + + //Throws exceptions if there is any problem loading the DLL or finding the hook procedures. + HookClass::HookClass() : m_enabled(true) + { + //Load library, check for error. + if (!this->LoadDLL(this->dllHandle)) + { + std::cerr << "Load Lib fail." << std::endl; + throw std::exception("Load library failure."); + } + + //Get address of our keyboard hook procedure in the DLL we just loaded, and check for error. + if (!GetFunctionLocationInDll(this->dllHandle, this->keyProc)) + { + //Handle error. + CleanupLibraries(); + throw std::exception("Failed to acquire handle to keyboard hook procedure!"); + } + //Get address of our update string function in the DLL. + if (!this->GetAlphabetUpdateFunctionInDll(this->dllHandle, this->updateFunction)) + { + //Handle error. + CleanupLibraries(); + throw std::exception("Failed to acquire handle to alphabet update procedure!"); + } + + + //Set hooks, finally. + std::cout << "Located keyboard proc.\nAttempting to set hook." << std::endl; + this->keyboardHookHandle = ::SetWindowsHookExA(WH_KEYBOARD_LL, this->keyProc, this->dllHandle, NULL); + + //Check the hook procedures for error state before continuing. + if (!this->CheckHook(this->keyboardHookHandle)) + { + //Handle error. + this->CleanupHooks(); + this->CleanupLibraries(); + std::cerr << "Unexpected error. Hook handles are invalid." << std::endl; + throw std::exception("Unexpected error. Hook handles are invalid."); + } + + std::cout << "\nAll hooks set.\n"; + } + HookClass::~HookClass() + { + CleanupHooks(); + CleanupLibraries(); + } + + //Tests a hook procedure HOOKPROC for error status. + //Returns: false on error detected. + bool HookClass::CheckHookProc(HOOKPROC proc) + { + if(!proc) + { + std::cerr << "Last error: " << ::GetLastError() << std::endl; + std::cerr << "Get proc addr fail." << std::endl; + return false; + } + return true; + } + //Tests a HHOOK for error status. + //Returns: false on error detected. + bool HookClass::CheckHook(HHOOK hook) + { + if(!hook) + { + std::cerr << "Last error: " << ::GetLastError() << std::endl; + std::cerr << "Set hook fail." << std::endl; + return false; + } + return true; + } + bool HookClass::CheckDllHandle(HMODULE hDll) + { + return (bool)this->dllHandle; + } + + void HookClass::CleanupHooks() + { + ::UnhookWindowsHookEx(this->keyboardHookHandle); + } + void HookClass::CleanupLibraries() + { + FreeLibrary(dllHandle); + } + + + + //Loads the DLL specified by HOOK_DLL_NAME + //Returns: True on success, false on failure. + bool HookClass::LoadDLL(HMODULE &handleToDll) + { + //Load library, check for error. + handleToDll = ::LoadLibraryA(HookDllName); + + //True on success, false on failure. + return (bool)handleToDll; + + } + + bool HookClass::GetFunctionLocationInDll(HMODULE handleToLoadedDll, HOOKPROC &hookProc) + { + //hookProc = (HOOKPROC)::GetProcAddress(handleToLoadedDll, MAKEINTRESOURCEA(2)); + hookProc = (HOOKPROC)::GetProcAddress(handleToLoadedDll, this->KeyboardHookProcedureName); + return CheckHookProc(hookProc); + + } + + bool HookClass::GetAlphabetUpdateFunctionInDll(HMODULE handleToLoadedDll, AlphabetUpdateFunc &f) + { + //AlphabetUpdateFunc is a typedef for a function pointer with the return type and parameters that match the function in the DLL. + //f = (AlphabetUpdateFunc)::GetProcAddress(handleToLoadedDll, MAKEINTRESOURCEA(1)); + f = (AlphabetUpdateFunc)::GetProcAddress(handleToLoadedDll, this->AlphabetUpdateProcedureName); + return f != NULL; + } + + //Used to toggle the keyboard hook. + void HookClass::Toggle() + { + if (m_enabled) + { + //Disable it. + this->CleanupHooks(); + m_enabled = false; + } + else + { + //Enable it. + this->keyboardHookHandle = ::SetWindowsHookExA(WH_KEYBOARD_LL, this->keyProc, this->dllHandle, NULL); + m_enabled = true; + } + } + //Used to update the translation alphabet. + bool HookClass::UpdateTranslation(std::wstring update) + { + return updateFunction(update); + } +} \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/HookClass.h b/HookProcDLL/SetHooksClassLibrary/HookClass.h new file mode 100644 index 0000000..88cb155 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/HookClass.h @@ -0,0 +1,65 @@ +//Caleb Taylor 2015 + +#pragma once +#include "stdafx.h" +#include + + +namespace HookDLL +{ + class HookClass + { + //AlphabetUpdateFunc is a typedef for a function pointer with the return type and parameters that match the function in the DLL. + //We will use this to store the address of the DLL function, and call it. + typedef bool(__stdcall *AlphabetUpdateFunc)(std::wstring str); + AlphabetUpdateFunc updateFunction; + + const char *HookDllName = "HookProcDLL.dll"; + + //Not used. + const char *KeyboardHookProcedureName = "keyboardHookProcedure"; + const char *AlphabetUpdateProcedureName = "SetTranslationAlphabet"; + + //Handle to a loaded DLL. + HMODULE dllHandle; + + //hook procedure handles. + HOOKPROC keyProc; + HOOKPROC mouseProc; + + //Handle to an already set Windows hook. + HHOOK keyboardHookHandle; + + //Enabled status. + bool m_enabled; + + protected: + //Tests a HOOKPROC structure for error condition. + bool CheckHookProc(HOOKPROC proc); + //Tests a HHOOK structure for error condition. + bool CheckHook(HHOOK hook); + //Tests a HMODULE handle to the DLL for error condition. + bool CheckDllHandle(HMODULE hDll); + //Remove windows hooks. + void CleanupHooks(); + //Free DLL. + void CleanupLibraries(); + //Loads a DLL, the handle is obtained via handleToDll. + bool LoadDLL(HMODULE &handleToDll); + //Obtains the address of the specified procedure in the specified DLL. + bool GetFunctionLocationInDll(HMODULE handleToLoadedDll, HOOKPROC &hookProc); + bool GetAlphabetUpdateFunctionInDll(HMODULE handleToLoadedDll, AlphabetUpdateFunc &f); + public: + //Default constructor. + HookClass(); + //Default destructor. + ~HookClass(); + + //Used to toggle the keyboard hook. + void Toggle(); + + //Used to update the translation alphabet. + bool UpdateTranslation(std::wstring update); + }; + +} \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/ReadMe.txt b/HookProcDLL/SetHooksClassLibrary/ReadMe.txt new file mode 100644 index 0000000..ae0ed79 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/ReadMe.txt @@ -0,0 +1,38 @@ +======================================================================== + DYNAMIC LINK LIBRARY : SetHooksClassLibrary Project Overview +======================================================================== + +AppWizard has created this SetHooksClassLibrary DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your SetHooksClassLibrary application. + +SetHooksClassLibrary.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +SetHooksClassLibrary.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +SetHooksClassLibrary.cpp + This is the main DLL source file. + +SetHooksClassLibrary.h + This file contains a class declaration. + +AssemblyInfo.cpp + Contains custom attributes for modifying assembly metadata. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.cpp b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.cpp new file mode 100644 index 0000000..2b746f2 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.cpp @@ -0,0 +1,6 @@ +// This is the main DLL file. + +#include "stdafx.h" + +#include "SetHooksClassLibrary.h" + diff --git a/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.h b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.h new file mode 100644 index 0000000..a5e51a3 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.h @@ -0,0 +1,83 @@ +// SetHooksClassLibrary.h +// Caleb Taylor 2015 +// If you use this code elsewhere, please mention me somewhere in the app. + + +#pragma once + +#using + +#include + +#include + +#include +#include "msclr\marshal_cppstd.h" + +using namespace msclr::interop; + +using namespace System; + +using namespace System::IO; + +using namespace System::Collections; + +using namespace System::Collections::Specialized; + + +#include "HookClass.h" + +namespace SetHooksClassLibrary +{ + + //Our wrapper class that wraps the native DLL loading and hook setting class. + public ref class HooksWrapper + { + //Native pointer to our native DLL manager class. + HookDLL::HookClass *hcp; + public: + //Constructor, will throw an exception if there is a problem instantiating the native class instance. + HooksWrapper() + { + try + { + hcp = new HookDLL::HookClass(); + } + catch (const std::exception& ex) + { + throw gcnew Exception(gcnew System::String(ex.what())); + } + } + //Destructor, deletes the native class instance. + ~HooksWrapper() + { + delete hcp; + } + + //Toggles the windows hook on/off. + //When toggled off, the keyboard keys will not be replaced with the translation alphabet. + void Toggle() + { + try + { + hcp->Toggle(); + } + catch (const std::exception& ex) + { + throw gcnew Exception(gcnew System::String(ex.what())); + } + } + + //Pass some data on to the native class. This updates the translation alphabet, currently "àƀćďĕƒğħíĵĸlmnǒpqrƨţuvwxÿzĀßCĐEFĢĦIJƘŁMNOƤQRƧŦUVWXYZ" + //String update should be 52 characters in length, or the same length as the alphabet to be translated. + //In this case the english alphabet used is "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ". + //Returns: false on failure, true on success. + //Note: Unicode or otherwise "wide" characters are what this is intended to be used with. + bool UpdateAlphabet(System::String ^update) + { + //marshal_as is quite useful. + std::wstring wsout = msclr::interop::marshal_as(update); + return hcp->UpdateTranslation(wsout); + } + }; +} diff --git a/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj new file mode 100644 index 0000000..e162eb0 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj @@ -0,0 +1,105 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8424E327-0206-47AB-A3BD-A85A864A2CBD} + v4.5 + ManagedCProj + SetHooksClassLibrary + + + + DynamicLibrary + true + v120 + true + Unicode + + + DynamicLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Level3 + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + Use + + + true + + + + + + Level3 + WIN32;NDEBUG;%(PreprocessorDefinitions) + Use + + + true + user32.lib + + + + + + + + + + + + + + + + + + + Create + Create + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.filters b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.filters new file mode 100644 index 0000000..b43a6ae --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.filters @@ -0,0 +1,58 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.user b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.user new file mode 100644 index 0000000..ef5ff2a --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/SetHooksClassLibrary.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/Stdafx.cpp b/HookProcDLL/SetHooksClassLibrary/Stdafx.cpp new file mode 100644 index 0000000..34421fe --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/Stdafx.cpp @@ -0,0 +1,5 @@ +// stdafx.cpp : source file that includes just the standard includes +// SetHooksClassLibrary.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/HookProcDLL/SetHooksClassLibrary/Stdafx.h b/HookProcDLL/SetHooksClassLibrary/Stdafx.h new file mode 100644 index 0000000..7907124 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/Stdafx.h @@ -0,0 +1,10 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#pragma once + + + +#include +#include \ No newline at end of file diff --git a/HookProcDLL/SetHooksClassLibrary/app.ico b/HookProcDLL/SetHooksClassLibrary/app.ico new file mode 100644 index 0000000..d06d92b Binary files /dev/null and b/HookProcDLL/SetHooksClassLibrary/app.ico differ diff --git a/HookProcDLL/SetHooksClassLibrary/app.rc b/HookProcDLL/SetHooksClassLibrary/app.rc new file mode 100644 index 0000000..eab4306 Binary files /dev/null and b/HookProcDLL/SetHooksClassLibrary/app.rc differ diff --git a/HookProcDLL/SetHooksClassLibrary/resource.h b/HookProcDLL/SetHooksClassLibrary/resource.h new file mode 100644 index 0000000..d5ac7c4 --- /dev/null +++ b/HookProcDLL/SetHooksClassLibrary/resource.h @@ -0,0 +1,3 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by app.rc diff --git a/HookSpeech/HookSpeech.sln b/HookSpeech/HookSpeech.sln new file mode 100644 index 0000000..28136c0 --- /dev/null +++ b/HookSpeech/HookSpeech.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HookSpeech", "HookSpeech\HookSpeech.csproj", "{2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Debug|Win32.ActiveCfg = Debug|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Release|Any CPU.Build.0 = Release|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD}.Release|Win32.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/HookSpeech/HookSpeech.v12.suo b/HookSpeech/HookSpeech.v12.suo new file mode 100644 index 0000000..ce12728 Binary files /dev/null and b/HookSpeech/HookSpeech.v12.suo differ diff --git a/HookSpeech/HookSpeech/App.config b/HookSpeech/HookSpeech/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/HookSpeech/HookSpeech/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/HookSpeech/HookSpeech/App.xaml b/HookSpeech/HookSpeech/App.xaml new file mode 100644 index 0000000..e6eaad5 --- /dev/null +++ b/HookSpeech/HookSpeech/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/HookSpeech/HookSpeech/App.xaml.cs b/HookSpeech/HookSpeech/App.xaml.cs new file mode 100644 index 0000000..52e02bb --- /dev/null +++ b/HookSpeech/HookSpeech/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace HookSpeech +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/HookSpeech/HookSpeech/HookProcDLL.dll b/HookSpeech/HookSpeech/HookProcDLL.dll new file mode 100644 index 0000000..a41d505 Binary files /dev/null and b/HookSpeech/HookSpeech/HookProcDLL.dll differ diff --git a/HookSpeech/HookSpeech/HookSpeech.csproj b/HookSpeech/HookSpeech/HookSpeech.csproj new file mode 100644 index 0000000..4fbb2de --- /dev/null +++ b/HookSpeech/HookSpeech/HookSpeech.csproj @@ -0,0 +1,114 @@ + + + + + Debug + AnyCPU + {2293DA8A-E2E9-4304-95A1-DD8EB8D6B8DD} + WinExe + Properties + HookSpeech + HookSpeech + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + passingThrough.ico + + + + False + .\SetHooksClassLibrary.dll + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + \ No newline at end of file diff --git a/HookSpeech/HookSpeech/MainWindow.xaml b/HookSpeech/HookSpeech/MainWindow.xaml new file mode 100644 index 0000000..62f9253 --- /dev/null +++ b/HookSpeech/HookSpeech/MainWindow.xaml @@ -0,0 +1,20 @@ + + + + + + +