|
1.“努力”打开“我的电脑”的“属性”
2.“努力”选择“硬件”页的“设备管理器”
3.“努力”展开“鼠标和其它指针设备”,你会发现多了一个“Microsoft Serial BallPoint”
4.“努力”选择“Microsoft Serial BallPoint”的“属性”
5.“努力”地把“设备用法”设置为“不要使用这个设备(停用)”
如果所有“努力”你都能完成的话,这个问题就一定可以解决了。之所以每一步操作前都加上“努力”是因为整个过程中鼠标都在乱跳,几乎不可能进行控制。本人就是用这种方法,整个过程使用键盘完成,并且成功了。有一点要注意,不要试图在这个过程中拔掉GPS,否则你将发现“Microsoft Serial BallPoint”也会随之不见了。
因为开机前串口一直有数据发送系统会识别为 “Microsoft Serial BallPoint”,串口就会打不开了
编程实现了一下
public class DisableSerialBball
{
private bool CreatProcessWithArguments(string path, string Arguments)
{
Process p = new Process();
p.StartInfo.FileName = path;
p.StartInfo.Arguments = Arguments;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
try
{
p.Start();
p.WaitForExit();
p.Close();
return true;
}
catch (Exception e)
{
return false;
}
}
/// <summary>
/// 判断操作系统是32位还是64位
/// </summary>
public int PlateFormRunMode
{
get
{
if (IntPtr.Size == 8)
{
return 64;
}
return 32;
}
}
/// <summary>
/// 禁用球设备
/// </summary>
/// <returns></returns>
public bool uninstall()
{
if (PlateFormRunMode == 32)
{
return CreatProcessWithArguments("DCX86.dll", " DISABLE *PNP0F09");
}
else
{
return CreatProcessWithArguments("DCX64.dll", " DISABLE *PNP0F09");
}
}
|
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|