Information générale
Catégorie:
Fonctions Windows API
The documentation on CreateProcessAsUser says
"By default, the new process is noninteractive, that is, it runs on a desktop that is not visible and cannot receive user input."
And even later on, in the closing remarks, reiterates with
"By default, CreateProcessAsUser creates the new process on a noninteractive window station with a desktop that is not visible and cannot receive user input. To enable user interaction with the new process, you must specify the name of the default interactive window station and desktop, "winsta0\default", in the lpDesktop member of the STARTUPINFO structure."
On the other hand, the description of the lpDesktop member of STARTUPINFO states "For CreateProcess and CreateProcessAsUser, if this member is NULL, the new process inherits the desktop and window station of its parent process. If this member is an empty string, the process does not inherit the desktop and window station of its parent process; instead, the system determines if a new desktop and window station need to be created. If the impersonated user already has a desktop, the system uses the existing desktop."
I suppose I need to pass an empty string as the desktop member in my STARTUPINFO string. How does an null terminated empty string differ, in this context, from a lone chr(0)? Passing the latter doesn't prevent the process from being visible.
Alternatively, does anybody know how to simply specify some standard invisible desktop that could be used with the plain, old CreateProcess?
Thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement