在upk 里挖坟得来,有兴趣查查这几个函数...
[cpp] view plain copy
- #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
时间: 2024-10-13 11:38:13