You are right, SHFileOperation are extreamely simplier to use (in comparison to shellexexuteex), however the behaviour of this function is a bit different. If you perform a SHFileOperation such as copy or cut in an application, if you get back directly to the Windows explorer, the 'paste' context menu item is not avalaible. It seems the shell is operating in another way than with whellexecuteex. With a ShellExecuteEx performed in an application and ion a single file, the explorer enable directly the 'paste' item.
Anyway the WinApi/ShellApi is not very clear about that because in summary there many ways to copy file(s):
- SHellExecuteEx with verb 'copy'
- SHFileOperation
- ClipBoard: when simulating a file drop event...
But in any ways the behaviour of the undo/redo shell context item is similar to the explorer process.
- ShellExecuteEx enable well the undo/redo features but only operates on singles file (or not documented)
- SHFileOperation enable to work on a file list (as you were saying, separated by a #0, end list a double #0. but the SHell context menu seems not to be linked as deeply as ShellExecuteEx to the operation.
- Clipboard: also allows file list but not all behaviour ( copy only, not paste). because 'paste' seems to be more a kind of drag drop move operation, not a clipboard one, even if the ShellApi Specifies that it's a bit the same...they are using special structures not used anywhere else...
Synthesis: it's not clear at all. The windows api provides at leat 3 way to operates on files but if we talk about a file list, it's less logical, and even a nightmare: you have to deal with the old struct that nobody use except the 3 guys at Microsoft who are still working on shell features...(or not).