Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Sep 26, 2007 11:29 am Post subject: HOWTO: Register a shell extension for multiple targets/extensions |
|
|
Some shell extensions, such as the ContextMenuExtension, PropertySheetExtension, IconExtension, etc require you to specify a target (typically a file extension) using the TargetExtension attribute. You can specify multiple targets by applying multiple TargetExtension attributes as follows :
[C#]
[Guid("B084EEB5-C144-4006-A7C3-8DB4ED46C54B"), ComVisible(true)]
[TargetExtension(".dll",true)]
[TargetExtension(".exe",true)]
[TargetExtension(".ocx",true)]
public class RegisterExtensionCtxExt : ContextMenuExtension
{
...
...
}
[VB.Net]
<Guid("0E202AE7-1782-4d70-B9E1-735335B1289F"), ComVisible(True), TargetExtension(".dll", True), TargetExtension(".exe", True), TargetExtension(".ocx", True)> _
Public Class RegisterExtensionCtxExt
...
...
End Class |
|