shlexec.c: fix context menu handling
Martin Fuchs
martin-fuchs at gmx.net
Wed Nov 30 06:53:39 CST 2005
Changelog:
Fix context menu handling for more than one entry in order to repair .lnk-file execution: Don't break at the first non-matching entry
Index: shlexec.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlexec.c,v
retrieving revision 1.77
diff -u -p -d -w -b -r1.77 shlexec.c
--- shlexec.c 28 Nov 2005 20:04:09 -0000 1.77
+++ shlexec.c 30 Nov 2005 12:52:30 -0000
@@ -1156,16 +1160,16 @@ static LONG ShellExecute_FromContextMenu
r = RegEnumKeyW( hkeycm, i++, szguid, 39 );
if ( r != ERROR_SUCCESS )
break;
- r = ERROR_FUNCTION_FAILED;
+
hr = CLSIDFromString( szguid, &guid );
- if ( FAILED( hr ) )
- break;
- r = ERROR_SUCCESS;
+ if (SUCCEEDED(hr))
+ {
/* stop at the first one that succeeds in running */
hr = shellex_load_object_and_run( hkey, &guid, sei );
if ( SUCCEEDED( hr ) )
break;
}
+ }
RegCloseKey( hkeycm );
}
More information about the wine-patches
mailing list