Re: SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- From: "Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 12 Apr 2006 11:14:49 -0400
IIRC, the hwnd member is the owner window passed to MessageBox or DialogBox
for any UI that ShellExecuteEx shows. At least, this is what I remember the
behavior being when I last used the function. The documentation is likely
wrong.
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message
news:%23qc7n%23gXGHA.3684@xxxxxxxxxxxxxxxxxxxxxxx
""Jeffrey Tan[MSFT]"" <jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:TTgdksgXGHA.5252@xxxxxxxxxxxxxxxxxxxxxxxx
Yes, I agree that "this function" means ShellExecute or ShellExecuteEx
that is using SHELLEXECUTEINFO.
After reading more, if I understand correctly, it can only be
ShellExecuteEx, not ShellExecute.
Do you still have any other concern? If so, I hope you can clarify your
main concern in the following reply. Thanks
Well, I'll rearrange some of my previous words, but I hope they'll be
clearer this time.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/structures/shellexecuteinfo.asp
hwnd
Window handle to any message boxes that the system might produce while
executing this function.
If ShellExecuteEx creates one or more message boxes then it will store one
message box's HWND into this member of the SHELLEXECUTEINFO structure?
For
some reason I have a feeling that the hwnd member probably doesn't receive
any useful information at all from anything that the system might produce
while executing this function. Another MSDN page gives a hint about what
this page maybe should say, but even that hint isn't enough, it takes some
guesswork.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/structures/shcreateprocessinfow.asp
hwnd
Parent window handle.
Here is my guess, but MSDN doesn't say: if I set that member of
SHCREATEPROCESSINFOW before calling SHCreateProcessAsUserW, then
SHCreateProcessAsUserW might use that hwnd as parent of any message boxes
that it displays. If that's true, it doesn't help my immediate needs, but
it would be a meaningful use for that hwnd member and I couldn't complain
about that. If that's true, then perhaps both MSDN pages could be updated
for both SHCREATEPROCESSINFOW and SHELLEXECUTEINFO in order to say how the
hwnd member is really used.
(I'd rather get the HWND of the first window that the executed application
creates, but, well, that's just wishful thinking.)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shcreateprocessasuser.asp
SHCreateProcessAsUserW is not supported under Windows XP. Users requiring
similar functionality should examine CreateProcess, CreateProcessAsUser,
CreateProcessWithLogonW and ShellExecuteEx
[...]
Minimum operating systems Windows 2000, Windows Millennium Edition
Interesting. An API that works in Windows ME, 2000, 2003, Vista, and
Longhorn Server, but not XP. Is this really true? Why is XP the only
exclusion from this list of client and server operating systems?
.
- References:
- SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- From: Norman Diamond
- RE: SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- From: "Jeffrey Tan[MSFT]"
- Re: SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- From: Norman Diamond
- SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- Prev by Date: Re: ShellExecuteEx again
- Next by Date: Re: how to use LogonUser
- Previous by thread: Re: SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
- Next by thread: ShellExecuteEx again
- Index(es):
Relevant Pages
|