好友
阅读权限40
听众
最后登录1970-1-1
|
就那么几个API,不过蛮好玩的
#include "windows.h"
void 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( &pi, sizeof(pi) );
CreateProcess( NULL, "explorer", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
Sleep(60000);
SwitchDesktop( hold);
CloseDesktop( hhdesk);
} |
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|