Identify device in windows hook

1.2k views Asked by At

I'm trying to write background app for log specific scanned codes via baracode scanner (connected as keyboard). I wrote code and it works fine, but I want to define device which can send input to my app

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    ...
    hhkLowLevelKybd = ::SetWindowsHookEx(WH_KEYBOARD_LL, (HOOKPROC)LowLevelKeyboardProc, 0, 0);
    ...
}

LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
    here i need check device

    // check and log code
}

thanks

1

There are 1 answers

0
i.paramonov On BEST ANSWER

Thanks to all, I found the way to solve this - this is library interception