CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程 驱动编程

文件名称:TestKeyboard

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2019-09-19
  • 文件大小:
    130.32kb
  • 已下载:
    1次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

C# 模拟键盘输入

1 .使用WinIO.dll直接在驱动层面模拟按键。
这里需要用到一个组件,那就是使用WinIO.dll,这是是国外大佬开发的一个dll。
 
WinIO程序库允许在32位的Windows应用程序中直接对I/O端口和物理内存进行存取操作。通过使用一种内核模式的设备驱动器和其它几种底层编程技巧,它绕过了Windows系统的保护机制。

使用此组件的环境要求:
•系统Win7或Win10均可。
•需要PS/2键盘(老式的针孔插头的键盘),USB键盘不行。
•正规使用的话需要官方授权签名,否则就得将Windows开启测试模式。
•使用此组件的应用程序需要以管理员的身份启动。
•此组件还有32位和64位的区分。
•与dll配套的还有个.sys的文件,要跟dll放在同一目录下。

Windows开启测试模式的方法:
以管理员身份打开cmd,输入开启测试模式的命令并执行。然后重启电脑,看到桌面右下角出现“测试模式”字样即可。

开启测试模式的命令:
bcdedit /set testsigning on
关闭测试模式的命令:
bcdedit /set testsigning off
开启测试模式成功:

2. 使用WinRing0x64.dll

这里还有另外一个组件WinRing0x64.dll,可以实现同样的效果。不需要授权签名,不需要开启测试模式,使用起来要方便很多。

使用此组件的环境要求:
•系统Win7或Win10均可。
•需要PS/2键盘(老式的针孔插头的键盘),USB键盘不行。
•使用此组件的应用程序需要以管理员的身份启动。
•与dll配套的还有个.sys的文件,要跟dll放在同一目录下。
•此组件应该也是区分32位和64位的,只是我只找到64位的,没再去管32位的。

调用此组件的示例代码有点长,这里就懒得贴了。

对于这两种方式,我写了一个完整、可行的Demo,包括需要的组件都在里面。
相关搜索: 模拟键盘鼠标

(系统自动生成,下载前可以参看下载内容)

下载文件列表

压缩包 : TestKeyboard.zip 列表
TestKeyboard-master/
TestKeyboard-master/.gitignore
TestKeyboard-master/README.md
TestKeyboard-master/TestKeyboard.sln
TestKeyboard-master/TestKeyboard/
TestKeyboard-master/TestKeyboard/DriverStageHelper/
TestKeyboard-master/TestKeyboard/DriverStageHelper/WinIO32.cs
TestKeyboard-master/TestKeyboard/DriverStageHelper/WinIO64.cs
TestKeyboard-master/TestKeyboard/DriverStageHelper/WinRing0.cs
TestKeyboard-master/TestKeyboard/Form1.Designer.cs
TestKeyboard-master/TestKeyboard/Form1.cs
TestKeyboard-master/TestKeyboard/Form1.resx
TestKeyboard-master/TestKeyboard/PressKey/
TestKeyboard-master/TestKeyboard/PressKey/EnumWindowsType.cs
TestKeyboard-master/TestKeyboard/PressKey/IPressKey.cs
TestKeyboard-master/TestKeyboard/PressKey/PressKeyByWinIO.cs
TestKeyboard-master/TestKeyboard/PressKey/PressKeyByWinRing0.cs
TestKeyboard-master/TestKeyboard/Program.cs
TestKeyboard-master/TestKeyboard/Properties/
TestKeyboard-master/TestKeyboard/Properties/AssemblyInfo.cs
TestKeyboard-master/TestKeyboard/Properties/Resources.Designer.cs
TestKeyboard-master/TestKeyboard/Properties/Resources.resx
TestKeyboard-master/TestKeyboard/Properties/Settings.Designer.cs
TestKeyboard-master/TestKeyboard/Properties/Settings.settings
TestKeyboard-master/TestKeyboard/TestKeyboard.csproj
TestKeyboard-master/TestKeyboard/bin/
TestKeyboard-master/TestKeyboard/bin/Debug/
TestKeyboard-master/TestKeyboard/bin/Debug/TestKeyboard.exe
TestKeyboard-master/TestKeyboard/bin/Debug/TestKeyboard.pdb
TestKeyboard-master/TestKeyboard/bin/Debug/WinIo32.dll
TestKeyboard-master/TestKeyboard/bin/Debug/WinIo32.sys
TestKeyboard-master/TestKeyboard/bin/Debug/WinIo64.dll
TestKeyboard-master/TestKeyboard/bin/Debug/WinIo64.sys
TestKeyboard-master/TestKeyboard/bin/Debug/WinRing0x64.dll
TestKeyboard-master/TestKeyboard/bin/Debug/WinRing0x64.sys

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com