
Opening multiple files using ShellExecute
Quote:
> Hello,
> I am opening multiple files using ShellExecute. The files can be images or wav
files, etc sent to their respective editing
Quote:
> application. However, passing the full path name of the files for the
ShellExecute parameter, could be too long. Let's say if the
Quote:
> files are located in a deep hierarchy folder level, and you want to open, say
50 files (doesn't matter why when where and how, let's
Quote:
> just assume it's 50) So I concatenate all these names into a CString and pass
it along to ShellExecute. So far it is working, but
Quote:
> what is the limit for the concatenated string length? Is it MAX_PATH?
> So here is the question. I had a better idea. I use a while loop instead, and
call ShellExecute for every document file I want to
Quote:
> open. This way I only have to pass 1 file name/path at a time. So I just would
like to make sure if this is a correct way to use
Quote:
> ShellExecute to open multiple document files at once, so that I call
ShellExecute in a loop for each doc file........ ?
Quote:
I am not the MS guy, but ShellExecute works exactly this way - it opens
something then returns. So in my opinion, the loop would be a lot better
solution than passing 32kB string for example! Do your loop :-)
Regards,
Peter