> Look here: > > http://windowssdk.msdn.microsoft.com/library/default.asp?url=/libr > ary/en-us/ > shellcc/platform/shell/reference/functions/shellexecuteex.asp > > 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? -- Jason Teagle [EMAIL PROTECTED] _______________________________________________ msvc mailing list msvc@beginthread.com See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.