Switchdesktop e Createdesktop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have createad an image of windows xpe SP1 with minlogon, and I have tried
to launch an application in a separate desktop with a simple loader that
create the new desktop and start the application with create process in this
desktop the source code is

hDesktop = CreateDesktop(
desktop,
NULL, NULL, 0,
//DESKTOP_CREATEMENU |
DESKTOP_CREATEWINDOW |
DESKTOP_SWITCHDESKTOP |
DESKTOP_READOBJECTS /*|
DESKTOP_WRITEOBJECTS |
STANDARD_RIGHTS_REQUIRED*/,
NULL );

ZeroMemory(&si, sizeof(STARTUPINFO));
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
si.cb = sizeof(STARTUPINFO);
si.lpDesktop = desktop;
//si.lpDesktop = NULL;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWDEFAULT;

SetCurrentDir(ExtractFilePath(filename));
bStarted = CreateProcess(NULL, //lpApplicationName: PChar;
filename, //lpCommandLine: PChar;
NULL, //PSecurityAttributes,
NULL, //PSecurityAttributes
FALSE, //bInheritHandles
NORMAL_PRIORITY_CLASS,//dwCreationFlags
NULL, //lpEnvironment
NULL, //lpCurrentDirectory
&si, //TStartupInfo
&pi); //TProcessInformation


Sleep(TempoSleep);

SwitchDesktop(hDesktop);

return 0;

In Windows XP professional edition this work fine, in XPE works only if set
si.lpDesktop = NULL, this means that the application run on the default
desktop and not on other : all application that I try to run in other desktop
return the same error.

My question is : in windows XPE SP1 multiple desktop are supported ? There's
a component to add in the target designer ?

Thanks in advance for the help.
 
Hi Paolo,

XPe SP1 can have all good things as XP Pro. But in your case you are using minlogon and that can be a problem. Try using winlogon
instead.

Regards,
Slobodan

PS:
Let us know if winlogon solved the problem.
 
I am also interested to know whether it is possible to create multiple desktops with Minlogon.

Theoretically, Desktops functionality may be independent from Logon component as Winlogon/GINA itself creates the Default secure
Desktop.

Minlogon as well as Winlogon imports the CreateDesktop function from user32.dll so, I think, it probably still creates the Default
Desktop.

Paolo, please let us know if you app works fine with Winlogon.
 
With Winlogon switchdekstop and createdesktop works fine.

Maybe minlogon does not manage desktop.

Bye
 
Paolo,

I guess the lack of Minlogon documentation only gives you an option of experimenting :-(

KM
 
I guess the lack of Minlogon documentation only gives you an option of experimenting :-(
Something like that :)

I usually prefer making things work on winlogon. Then just replace in resolved project in TD winlogon with minlogon component.
And if it is not working then I know at least that this is not dependency related problem but rather minlogon.

Regards,
Slobodan
 
Back
Top