Hello
recently i had been playing with ComamndLine, and i chose to open 3-4 files with my exe via context menu integreation.
I noticed that when i use GetCommandLine, i see "path to my exe" "1st chosen file" and the rest open in differnt instances of the app.
How to make it single instance ?
now my question is how do i get the rest of the files when i had opened ?
In general how to load more than one file via context menu integeration ?
Please help
starz
if i remember right the shell extension should be com based, and work from DragQueryFile .. etc..
not GetCommandLine
Why do you need to do this?
i am working on a program which will process more than one file at a time, so i need this, got any ideas bro ?
What happens when you use "Send To" ? Supposing of course you make a shortcut of your program in your "Send To" folder ?
Hmm, or maybe your proggy can detect if there's a previous instance running and pass the filename to that and then exit.
Or you could do this in this opposite way with GetOpenFileName, which can handle multiple file selection.
EDIT: Just tested, and yes, the Send To method works as expected.
Hi,
to make Windows explorer open only one instance of your program - to process multiple files - the program must be "DDE-aware". You can probably see examples of other programs which support this feature in your Windows registry. If there exists a "shell/open/ddeexec" key with a value such as "[open("%1")] or similar, then a running instance of this program will be notified by explorer via DDE about the arguments.