Jason

> > Snippet:
> >
> > "If the function succeeds, it sets the hInstApp member of the 
> > SHELLEXECUTEINFO structure to a value greater than 32. If 
> the function 
> > fails, hInstApp is set to the SE_ERR_XXX error value that best 
> > indicates the cause of the failure. Although hInstApp is 
> declared as 
> > an HINSTANCE for compatibility with 16-bit Microsoft Windows 
> > applications, it is not a true HINSTANCE. It can only be cast to an 
> > int and compared to either 32 or the SE_ERR_XXX error codes."
> 
> Be careful here - I fear you are misunderstanding slightly. 
> This indicates the result of calling ShellExecute(Ex)(), 
> nothing more; it is NOT intended to be a guide as to how the 
> program it ran fared. If ShellExecute(Ex)() manages to 
> /start/ regedit successfully, then it will return a valid 
> HINSTANCE value. It doesn't care whether regedit has problems or not!
> 
> ShellExecuteEx(regedit) --> regedit fails to start
> 
>       --> ShellExecuteEx() returns fail code (program didn't start)
> 
> ShellExecuteEx(regedit) --> regedit starts OK --> regedit 
> imports perfectly
> 
>       --> ShellExecuteEx() returns success code (program started OK)
> 
> ShellExecuteEx(regedit) --> regedit starts OK --> regedit 
> fails to imports properly
> 
>       --> ShellExecuteEx() returns success code (program started OK)
> 
> 
> Make more sense?

Absolutely.  I think I should keep the check, to ensure SEE worked, but
maybe suppress the "imported ok" box.  Or maybe I should not use the /s
param afterall?  I will try later.

Andrew


This email and any attached files are confidential and copyright protected. If 
you are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in 
this communication shall be legally binding.

_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to