News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Open multiple files via contextmenu

Started by starzboy, February 10, 2009, 08:03:30 AM

Previous topic - Next topic

starzboy

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

evlncrn8

if i remember right the shell extension should be com based, and work from DragQueryFile .. etc..
not GetCommandLine

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

starzboy

i am working on a program which will process more than one file at a time, so i need this, got any ideas bro ?

BlackVortex

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.

japheth

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.