2/14/2007

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.
Copy Code
[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