2015-02-26 7:36 GMT-07:00 Nikolay Sivov bunglehead@gmail.com:
MSDN says that ShellExecute returns a value of 32 or less if it fails, and a value greater than 32 if it succeeds: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%...
-Alex
+ if((int)ShellExecute(parent,NULL,commandLine,NULL,NULL,SW_NORMAL)>32) + return TRUE; + else + return FALSE;
I think this would be more elegantly expressed as
return (int)ShellExecute(parent,NULL,commandLine,NULL,NULL,SW_NORMAL)>32;
But more importantly, are you sure that SHRunControlPanel will execute anything? What if the filename doesn't end in .cpl? You'll probably have to write some tests before this patch is accepted.
-Alex