How to: Register a File System Shortcut Menu

Send Feedback

Code Example

The following code example demonstrates how to register a file system shortcut menu extension for *.gif files accessed from the shortcut menu in File Explorer.

Note   To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

[HKEY_CLASSES_ROOT\CLSID\{12345678-9ABC-DEF1-2345-6789ABCDEF123}]
   @="My Context Menu Extension"

[HKEY_CLASSES_ROOT\CLSID\{12345678-9ABC-DEF1-2345-6789ABCDEF123}\InProcServer32]
   @="cmycomp.dll"
   "ThreadingModel"="Free"

[HKEY_CLASSES_ROOT\gifimage\Shellex\ContextMenuHandlers\{12345678-9ABC-DEF1-2345-6789ABCDEF123}]
   @="MyOption"

See Also

Menus | How to: Extend Shortcut Menus | Registration Format for Application Shortcut Menu Extensions | Registration Format for File System Shortcut Menu Extensions | Shortcut Menu Overview

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.