解决刷卡登录问题
This commit is contained in:
@@ -82,14 +82,16 @@ namespace JinYuan.Helper
|
||||
}
|
||||
private int KeyboardHookProc(int nCode, Int32 wParam, IntPtr lParam)
|
||||
{
|
||||
|
||||
|
||||
EventMsg msg = (EventMsg)Marshal.PtrToStructure(lParam, typeof(EventMsg));
|
||||
codes.Add(msg);
|
||||
if (ScanerEvent != null && msg.message == 13 && msg.paramH > 0 && !string.IsNullOrEmpty(codes.Result))
|
||||
{
|
||||
ScanerEvent(codes);
|
||||
|
||||
// 返回一个非零值,阻断键盘消息继续向下传递
|
||||
return 1;
|
||||
}
|
||||
|
||||
return CallNextHookEx(hKeyboardHook, nCode, wParam, lParam);
|
||||
}
|
||||
public class ScanerCodes
|
||||
|
||||
Reference in New Issue
Block a user