|
你说的多桌面是否是这样生成的桌面?
- ::SECURITY_ATTRIBUTES sa;
- sa.bInheritHandle = TRUE;
- sa.nLength = sizeof(SECURITY_ATTRIBUTES);
- sa.lpSecurityDescriptor = NULL;
-
- HDESK hD1 = CreateDesktop("w", NULL,
- NULL,0,MAXIMUM_ALLOWED,
- NULL);
- ::STARTUPINFO sui;
- :ROCESS_INFORMATION pi;
- ::ZeroMemory ((PVOID)&sui, sizeof(sui));
- sui.cb = sizeof (sui);
- sui.lpDesktop = _T("w");
- ::CreateProcess (NULL,"explorer",NULL,NULL,TRUE,
- CREATE_DEFAULT_ERROR_MODE|CREATE_SEPARATE_WOW_VDM,NULL,NULL,&sui,&pi);
- HDESK hD2 = GetThreadDesktop(GetCurrentThreadId());
- ::SwitchDesktop(hD1);
- ::Sleep(6000);
- ::SwitchDesktop(hD2);
复制代码 |
|