c#


How does shell extension pass multiple selected files to my own program?


Ive been reading all day and night, on how to make windows explorer add your custom menu in the context menu when right clicking on multiple files.
Whats the process would the shell extension pass selected files to let say my c# wpf program and get these all paths?
And to package my program, does it mean I have to package both my program and the shell extension together so they are both installed and can work hand in hand together?
Ive been spending hours and hours trying to get my head of the process to implement it.
Shell extension receives initialization with IShellExtInit::Initialize call, where it's given an IDataObject* argument with CF_HDROP shaped data, which is used by shell extension with DragQueryFile API (see How to Drag and Drop multiple files between Namespace extensions) to access multiple file paths.
Once shell extension extracted the file paths, and you need it to pass the collection to an application you supposedly launch from the shell extension, you are free to define your own method of passing the strings further. For example, you can format a command line from the path strings, or write paths to a temporary file then pass its name as a command line argument.
When you want to pass the strings to already running application, you might want to use WM_COPYDATA message (see Use WM_COPYDATA to send data between processes) or alternative IPC method.

Related Links

Open program on the 2nd monitor
MVC Tab postback when clicked
Running out of memory on vps
Return more than one object
Threaded DownloadFileAsync
How to delete embedded resource in c#?
How to create a sprite class to prevent repeating the same code all the time?
WCF OutOfMemory Exception
Exclamation Storing multiple function calls in an array
How to parse JSON objects with numeric keys using JavaScriptSerializer
Validating user rights when invoking controller method in ASP.NET MVC
MS Chart X Axis label repeated - showing multiple points for a single item [Range Bar]
Print single JSON Object as a CSV in C#
Create MySQL config file and Verify Connection Before App Can Be Used
How can i compare a string with 3 other strings?
WPF window/usercontrol inheritance XAML

Categories

HOME
qlikview
max
http
skypedeveloper
sms
ms-access-2010
sitemap
restheart
wkhtmltopdf
coding-style
google-app-maker
fastreport
ofbiz
gpo
url-parameters
include-path
beaker-notebook
matlab-gui
inline-assembly
pumping-lemma
multiple-inheritance
marionette
large-files
spock
boost-log
loopback
keil
storefront
openvms
matlab-compiler
ansible-inventory
pymunk
leaderboard
nscollectionview
aspose.pdf
opos
lucee
dcom
android-vectordrawable
node.js-client
spring-cloud-aws
joystick
class-design
jigsaw
csc
airwatch
objectify
patching
vitamio
php-java-bridge
archiva
containstable
fadein
videoview
overlapping
gtkwave
transport
dcg
waterline
esb-toolkit-2.1
veeam
chrome-mobile
breeze-sharp
nsnotificationcenter
agent-based-modeling
sendy
xps
8-puzzle
mobile-robots
listpicker
usersettings
latex-suite
brew
boost.build
cron4j
pdf-reader
nserror
funambol
norton
cinder
mass-emails
xslt-grouping
large-data-volumes
html-help-workshop
ironpython-studio
memory-consumption

Resources

Encrypt Message