473,626 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use Shell Extensions class from Eduardo Morcillo

I was looking for the easiest way to add an item to explorer's right click menus, and I found what looks to be a
goldmine.
There is a vb.net project available on:
http://www.mvps.org/emorcillo/en/cod...tensions.shtml

that encapsulates the ugly stuff and gives an easy way to make the dll explorer will look for as the extension handler.
Only problem is, I don't see how it "runs". All the other progs to do shell extensions are exe's, they run and set up
registry entries to get explorer informed that the handler (dll) is to be run whan a given file extension is
right-clicked.

the website says "The code includes a library with base classes from which the extensions classes inherits. The base
classes contains the code to register the extensions automatically (with the help of two custom attributes) when the
extension library is registered for COM"

then says:
ExtensionFileTy pesAttribute
This attribute is used to set the file types for which an extension has to be registered. To register a extension for
several file types, separate the file types with a comma:

<ExtensionFileT ypes("mp3file,a vifile,soundrec ,mpegfile")>

I know how to register a dll, but have never done so with attributes. Can anyone make sense of how to get things set up
once I make the project?

I keep wondering if someone has written a prog that allows you to add right click options, and specify what to do with
the files with a command line operation. Its easy to write a prog that takes command line params, but hooking it up so
explorer feeds it the filenames is quite the process it seems.
Dec 16 '06 #1
1 2190
James Maeding wrote:
that encapsulates the ugly stuff and gives an easy way to make the dll explorer will look for as the extension handler.
Only problem is, I don't see how it "runs". All the other progs to do shell extensions are exe's, they run and set up
registry entries to get explorer informed that the handler (dll) is to be run whan a given file extension is
right-clicked.
<snip>
>
<ExtensionFileT ypes("mp3file,a vifile,soundrec ,mpegfile")>

I know how to register a dll, but have never done so with attributes. Can anyone make sense of how to get things set up
once I make the project?
>From my brief reading of the site, it would seem that you need to
create a COM class that inherits from the appropriate base class in the
library. Then apply the ExtensionFileTy pes attribute to indicate which
file types the extension works with. After that, I think you just need
to register the resulting .dll like you would any other and it should
work.

I compiled the mp3contextmenu example and once registered, I could
right click on an .mp3 file to create a playlist.

Good luck

Chris

Dec 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3262
by: R.Marquez | last post by:
I just happened to bump into this today when I went to the Win32 Python Extensions page. I think the M.H. and his team are a bit too modest. Quote: "win32com.shell grows many more interfaces, allowing Python to operate as a nearly complete shell extension, and to interact with the shell interfaces. See the win32comext\shell\demos\server directory for examples."
2
1913
by: Arthur Roodenburg | last post by:
Hello, I built property page shellextensions, based on the DependencyWalker sample from Microsoft. On some machines these shellextensions do not work. I implemented it like this (consider the registration code): public class ExtensionHandler : IShellExtInit, IShellPropSheetExt {
1
3504
by: Thomas W | last post by:
Well, is it possible to write Win32 shell extension in python? I want to create a virtual folder ( like gmailfs ) to serve files from a http-server ( and no, I cannot use webdav ) so that users can access them like normal files in Windows Explorer. Any hints or info about this would be highly appreciated. Regards, Thomas
5
4606
by: gjuro kladaric | last post by:
it was not possible to make a shell extension from within VB2003, I believe has anything changed since then, can I (easily) write a VB code that would function as a shell extension thank you gjuro
7
1171
by: Ole Nielsby | last post by:
I want to create a class with a variably-sized array inlined. The array size will be known at each instantiation but not at compile time. Once created, arrays won't grow or shrink and their contents won't change. The array length will be accessible via a smart pointer located before the array. On destruction, it must be fetched before the smartpointer containing it is destroyed. The arrays will typically hold smart pointers, so proper
3
5040
by: Poggs | last post by:
Hi everyone, I used the pattern for Shell Extensions for Context menu from Dino Esposito's article. However I implemented it in more than one application and it seems that those two right click functionalities cannot work together. void IContextMenu.InvokeCommand (IntPtr pici) I put more debugging information and I noticed that the two assemblies are using a common value. I haved changed their namespaces and guids to be different but...
2
1920
by: Jeff Gaines | last post by:
I am in the process of upgrading to XP 64. VS2008 is running fine but one of my apps, which adds functionality to the Explorer context menu, just won't work under XP 64. Googling resulted in my finding an article saying that MSFT recommends against writing shell extensions in managed code and does not consider them a supported scenario. So, can anybody point me to any articles relating to writing shell extensions in non managed code...
1
874
by: Christian Reizlein | last post by:
Does anyone have any point of source on how to create context meny and property tabs shells extensions in VB.net? My intention is to integrate my program with jpg and bmp extensions and be able to display a custom menu on the contextual menu of these filetypes. I know they have to be registered in the registry with a guid and point to a dll but i have no idea on how to develop those in .net Thanks for the help.
1
1241
by: Patrick Philippot | last post by:
Hi, According to this discussion: http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/ it is very unsafe to write shell extensions in managed code (and I can understand why). However, Microsoft themselves are providing such extensions and are giving examples in the SDK. So what? I have to make a design decision about a new product and I'm rather puzzled by this.
0
8203
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.