desktop_createmenu |
desktop_createwindow |
desktop_enumerate |
desktop_hookcontrol |
desktop_journalplayback |
desktop_journalrecord |
desktop_readobjects |
desktop_switchdesktop |
desktop_writeobjects);
if (hdesk == null)
return false;
//
// set the desktop to be "default"
//
if (!setthreaddesktop(hdesk))
return false;
postmessage(hwnd_broadcast,wm_hotkey,0,makelparam(mod_alt|mod_control,vk_delete));
//
// reset the window station and desktop
//
if (!setprocesswindowstation(hwinstacurrent))
return false;
if (!setthreaddesktop(hdeskcurrent))
return false;
//
// close the windowstation and desktop handles
//
if (!closewindowstation(hwinsta))
return false;
if (!closedesktop(hdesk))
return false;
return true;
}
偶一开始试验了发现不成功,后来冰河大哥告诉我说opendesktop("winlogon", ......)本身需要localsystem权限,
果然如此,把它注册成服务,然后效果实现。相信如何注册成服务不用我说了吧。ok,我们想要的功能实现了。
3.还有一种方法
dos下键盘的完全控制 ------- 一系列的bios级别的键盘控制函数!
http://dev.csdn.net/develop/article/7/7181.shtm