VS2008下,F5 调试时正常,编译后运行出错
System.ComponentModel.Win32Exception: 拒绝访问。
在 System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents)
在 System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait)
在 System.Windows.Forms.SendKeys.Send(String keys)网上有说是被360拦截了,但卸掉还是不行,有人遇到过么?
目前只能用
[DllImport("user32.dll")]
private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
keybd_event(0x20, 0, 0, 0);但没sendkey好用,可以发中文字符串
System.ComponentModel.Win32Exception: 拒绝访问。
在 System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents)
在 System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait)
在 System.Windows.Forms.SendKeys.Send(String keys)网上有说是被360拦截了,但卸掉还是不行,有人遇到过么?
目前只能用
[DllImport("user32.dll")]
private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
keybd_event(0x20, 0, 0, 0);但没sendkey好用,可以发中文字符串
在web.config文件添加:
<identity impersonate=true userName= "Administrator " password= "你机器的管理人密码 "/>
应该和安全无关吧?不会当木马吧?