Changeset 70


Ignore:
Timestamp:
Jun 24, 2012, 10:42:30 PM (9 years ago)
Author:
roman
Message:
 
Location:
trunk/Utilities/ConsoleKeyboardHook
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/ConsoleKeyboardHook/ConsoleKeyboardHook.cpp

    r69 r70  
    1111  HWND consoleWindow = GetConsoleWindow();
    1212  HINSTANCE hInstCons = (HINSTANCE)GetWindowLong( consoleWindow, GWL_HINSTANCE );
     13
     14  // NOTE: This has to be NULL
     15  hInstCons = NULL;
     16
    1317  hKeyboardHook = SetWindowsHookEx( WH_KEYBOARD, (HOOKPROC)KeyboardCallback, hInstCons, GetCurrentThreadId());
     18  _tprintf(_T("consoleWindow 0x%p, hInstCons 0x%p, hKeyboardHook 0x%p\n"), consoleWindow, hInstCons, hKeyboardHook);
    1419
    1520  MessageBox(NULL, _T("It is keyboard time!"), _T("Let's Go"), MB_OK);
  • trunk/Utilities/ConsoleKeyboardHook/ConsoleKeyboardHook.vcxproj

    r69 r70  
    6464      <IntrinsicFunctions>true</IntrinsicFunctions>
    6565      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     66      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    6667    </ClCompile>
    6768    <Link>
Note: See TracChangeset for help on using the changeset viewer.