privateintKeyboardHookProc(intnCode,Int32wParam,IntPtrlParam){if(nCode==0){EventMsgmsg=(EventMsg)Marshal.PtrToStructure(lParam,typeof(EventMsg));if(wParam==0x100)//WM_KEYDOWN=0x100{barCode.VirtKey=msg.message