阅读:1322回复:3
请教
我在Windows 2000下修改<<XP 下屏蔽\"Alt+Ctrl+Del\">>的程序,出现了一个错误,请问怎么修改????
原程序: void KbfilterDevice::KBServiceCallback( PKEYBOARD_INPUT_DATA InputDataStart, PKEYBOARD_INPUT_DATA InputDataEnd, PULONG InputDataConsumed) { if(InputDataStart->Flags == KEY_MAKE || InputDataStart->Flags == KEY_E0) { if(InputDataStart->MakeCode == 0x1d) m_KeyBoardFlag.Ctrl_Flag = TRUE; if(InputDataStart->MakeCode == 0x38) m_KeyBoardFlag.Alt_Flag = TRUE; } if(InputDataStart->Flags & KEY_BREAK) { if(InputDataStart->MakeCode == 0x1d) m_KeyBoardFlag.Ctrl_Flag = FALSE; if(InputDataStart->MakeCode == 0x38) m_KeyBoardFlag.Alt_Flag = FALSE; } t << \"scancode \" << InputDataStart->MakeCode << \"\\n\"; t << \"Keyboard_flag \" << InputDataStart->Flags << \"\\n\"; t << \"Ctrl_Alt_flag \" << m_KeyBoardFlag.b_KeyBoardFlag + 0 << \"\\n\"; if ((InputDataStart->MakeCode == 0x53) && (!(m_KeyBoardFlag.b_KeyBoardFlag ^ KEYBORAD_MASK))) { t << \"condition satisfied \" << InputDataStart->MakeCode << \"\\n\"; t << \"condition satisfied \" << m_KeyBoardFlag.b_KeyBoardFlag + \'0\' << \"\\n\"; InputDataStart->MakeCode = 0x00; InputDataStart->Flags = 0x00; } m_RealClassService( m_RealDeviceObject, InputDataStart, InputDataEnd, InputDataConsumed); } 我改成了, oid KbfilterDevice::KBServiceCallback( PKEYBOARD_INPUT_DATA InputDataStart, PKEYBOARD_INPUT_DATA InputDataEnd, PULONG InputDataConsumed) { int i; if(InputDataStart->Flags == KEY_MAKE ||InputDataStart->Flags == KEY_E0) { if(InputDataStart->MakeCode == 0x1E) { for(i=2;i>0;i--) { InputDataStart->MakeCode = 0x4E; InputDataStart->Flags = 0x00; (*(PSERVICE_CALLBACK_ROUTINE) devExt->UpperConnectData.ClassService)( devExt->UpperConnectData.ClassDeviceObject, InputDataStart, InputDataEnd, InputDataConsumed); } } else { (*(PSERVICE_CALLBACK_ROUTINE) devExt->UpperConnectData.ClassService)( devExt->UpperConnectData.ClassDeviceObject, InputDataStart, InputDataEnd, InputDataConsumed); } } 就出现了错误, E:\\kbfilter_bmyyyud_20050509-1157\\sys\\KbfilterDevice.cpp(0) : fatal error C1051: program database file, \'e:\\kbfilter_bmyyyud_20050509-1157\\sys\\objchk\\i386\\kbfilter.pdb\', has an obsolete format, delete it and recompile Error executing cl.exe. |
|
沙发#
发布于:2005-06-18 09:57
如果仅从这个错误信息上看,你可以把objchk那个目录全部删除再重试一下
|
|
|
板凳#
发布于:2005-06-18 14:37
删了以后就出现了以下错误:
E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(166) : error C2065: 'devExt' : undeclared identifier E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(166) : error C2227: left of '->UpperConnectData' must point to class/struct/union E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(166) : error C2228: left of '.ClassService' must have class/struct/union type E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(167) : error C2227: left of '->UpperConnectData' must point to class/struct/union E:kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(167) : error C2228: left of '.ClassDeviceObject' must have class/struct/union type E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(176) : error C2227: left of '->UpperConnectData' must point to class/struct/union E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(176) : error C2228: left of '.ClassService' must have class/struct/union type E:kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(177) : error C2227: left of '->UpperConnectData' must point to class/struct/union E:\kbfilter_bmyyyud_20050509-1157\sys\KbfilterDevice.cpp(177) : error C2228: left of '.ClassDeviceObject' must have class/struct/union type Error executing cl.exe. |
|
地板#
发布于:2005-06-18 16:58
上面问题我已经解决了. 我把程序改为按个"a"键输出一个"++"
安装了这个驱动以后,打开一个记事本,可以在里面使用,其他的键没变.. 但将此记事本最小化再还原,整个键盘就没有用了,鼠标也没有用了,这是怎么回事啊???? 这个程序还缺什么??? |
|