Digging graves in UPK, interested in checking these functions ...
[CPP]View PlainCopyprint?
- #include "Windows.h"
- #pragma comment (lib, "User32.lib")
- int main ()
- {
- Startupinfo si;
- Process_information Pi;
- char deskname[]="PP";
- Hdesk hold = Getthreaddesktop (GetCurrentThreadID ());
- hdesk Hhdesk = createdesktop (deskname, NULL, NULL, Df_allowotheraccounthook, generic_all, NULL);
- Switchdesktop (Hhdesk);
- SetThreadDesktop (Hhdesk);
- ZeroMemory (&si, sizeof (SI));
- SI.CB = sizeof (SI);
- Si.lpdesktop = Deskname;
- ZeroMemory (π, sizeof (PI));
- CreateProcess (NULL, "explorer", NULL, NULL, FALSE, 0, NULL, NULL, &si,π);
- Sleep (60000);
- Switchdesktop (hold);
- Closedesktop (Hhdesk);
- }
http://blog.csdn.net/wangningyu/article/details/5179221
Code to create a virtual desktop (restart the desktop process) (using functions such as Getthreaddesktop,createdesktop,setthreaddesktop)