Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

.NET Shell Extensions - Shell Preview Handlers

, 20 May 2014 MIT
Quickly create Shell Preview Handlers for Windows or Outlook using .NET!
SharpShell_Core_Library.zip
SharpShell.dll
SharpShell_Source_Code.zip
SharpShell Source Code
Dependencies
Apex
Apex.WinForms.dll
SharpShell
packages
Apex.1.5.0
Apex.1.5.0.nupkg
lib
net35
Apex.dll
net40
Apex.dll
sl30
Apex.Silverlight.dll
sl3-wp
Apex.WP7.dll
sl40
Apex.Silverlight4.dll
sl4-wp71
Apex.WP7.dll
sl50
Apex.Silverlight.dll
ILMerge.2.12.0803
ILMerge.2.12.0803.nupkg
ILMerge.doc
ILMerge.exe
NUnit.2.6.2
lib
nunit.framework.dll
NUnit.2.6.2.nupkg
NUnit.2.6.2.nuspec
Samples
ContextMenu
CountLinesExtension
CountLinesExtension.csproj.vspscc
Key.snk
Properties
Resources
CountLines.bmp
DllContextMenuExtension
DllContextMenuExtension.csproj.vspscc
Key.snk
Properties
DropHandler
XsdDropHandler
ExampleFiles
Key.snk
Properties
XsdDropHandler.csproj.vspscc
IconHandler
DllIconHandler
DllIconHandler.csproj.vspscc
Key.snk
Properties
Resources
ManagedDll.ico
NativeDll.ico
IconOverlayHandler
ReadOnlyFileIconOverlayHandler
Key.snk
Properties
ReadOnlyFileIconOverlayHandler.csproj.vspscc
Resources
ReadOnly.ico
InfoTipHandler
FolderInfoTipHandler
FolderInfoTipHandler.csproj.vspscc
Key.snk
Properties
PreviewHandler
IconPreviewHandler
Dependencies
IconLib.dll
IconLib.dll
IconPreviewHandler.csproj.user
IconPreviewHandler.csproj.vspscc
Key.snk
Properties
PropertySheet
DrivePropertySheet
DrivePropertySheet.csproj.vspscc
Key.snk
Properties
ResourcesPropertySheet
Key.snk
Properties
ResourcesPropertySheet.csproj.vspscc
TextFilePropertySheet
Key.snk
Properties
TextFilePropertySheet.csproj.vspscc
SharpShell
Attributes
Diagnostics
Extensions
Interop
Key.snk
NativeBridge
SharpShellNativeBridge32.dll
SharpShellNativeBridge64.dll
Properties
ServerRegistration
SharpContextMenu
SharpDropHandler
SharpIconHandler
SharpIconOverlayHandler
SharpInfoTipHandler
SharpPreviewHandler
SharpPropertySheet
SharpShell.csproj.user
SharpShell.csproj.vspscc
SharpShellNativeBridge
SharpShellNativeBridge.aps
SharpShellNativeBridge.vcxproj.filters
SharpShellNativeBridge.vcxproj.user
SharpShellNativeBridge.vcxproj.vspscc
SharpShellNativeBridge1.aps
Tools
ExtensionManager
Properties
Settings.settings
Resources
xsd.ico
ServerInspector
Properties
Settings.settings
ServerInspector.csproj.vspscc
Servers
ServerManager
About
LogView
Properties
Settings.settings
Resources
ChangeYourView.png
ContextMenu.png
Icon.png
IconOverlayHandler.png
InfoTip.png
openHS.png
PlayHS.png
PropertySheet.png
View_Details.png
View_LargeIcons.png
View_List.png
View_SmallIcons.png
View_Tiles.png
ServerDetails
ServerManager.csproj.user
ServerManager.csproj.vspscc
SharpShell.ico
TestShell
ShellExtensionManager
Properties
Settings.settings
ShellExtensionManager.csproj.vspscc
SharpShell_Tools.zip
SharpShell.dll
Apex.WinForms.dll
ServerManager.exe
Apex.dll
ServerInspector.exe
using System;

namespace SharpShell.Interop
{
    /// <summary>
    /// Flags that indicate the content and validity of the other structure members; a combination of the following values:
    /// </summary>
    [Flags]
    public enum SEE : uint
    {
        /// <summary>
        /// Use default values.
        /// </summary>
        SEE_MASK_DEFAULT = 0x00000000,

        /// <summary>
        /// Use the class name given by the lpClass member. If both SEE_MASK_CLASSKEY and SEE_MASK_CLASSNAME are set, the class key is used.
        /// </summary>
        SEE_MASK_CLASSNAME = 0x00000001,

        /// <summary>
        /// Use the class key given by the hkeyClass member. If both SEE_MASK_CLASSKEY and SEE_MASK_CLASSNAME are set, the class key is used.
        /// </summary>
        SEE_MASK_CLASSKEY = 0x00000003,

        /// <summary>
        /// Use the item identifier list given by the lpIDList member. The lpIDList member must point to an ITEMIDLIST structure.
        /// </summary>
        SEE_MASK_IDLIST = 0x00000004,

        /// <summary>
        /// Use the IContextMenu interface of the selected item's shortcut menu handler. Use either lpFile to identify the item by its file system path or lpIDList to identify the item by its PIDL. This flag allows applications to use ShellExecuteEx to invoke verbs from shortcut menu extensions instead of the static verbs listed in the registry.
        /// Note SEE_MASK_INVOKEIDLIST overrides and implies SEE_MASK_IDLIST.
        ///  </summary>
        SEE_MASK_INVOKEIDLIST = 0x0000000C,

        /// <summary>
        /// Use the icon given by the hIcon member. This flag cannot be combined with SEE_MASK_HMONITOR.
        /// Note This flag is used only in Windows XP and earlier. It is ignored as of Windows Vista.
        /// </summary>
        SEE_MASK_ICON = 0x00000010,

        /// <summary>
        /// Use the keyboard shortcut given by the dwHotKey member.
        /// </summary>
        SEE_MASK_HOTKEY = 0x00000020,

        /// <summary>
        /// Use to indicate that the hProcess member receives the process handle. This handle is typically used to allow an application to find out when a process created with ShellExecuteEx terminates. In some cases, such as when execution is satisfied through a DDE conversation, no handle will be returned. The calling application is responsible for closing the handle when it is no longer needed.
        /// </summary>
        SEE_MASK_NOCLOSEPROCESS = 0x00000040,

        /// <summary>
        /// Validate the share and connect to a drive letter. This enables reconnection of disconnected network drives. The lpFile member is a UNC path of a file on a network.
        /// </summary>
        SEE_MASK_CONNECTNETDRV = 0x00000080,

        /// <summary>
        /// Wait for the execute operation to complete before returning. This flag should be used by callers that are using ShellExecute forms that might result in an async activation, for example DDE, and create a process that might be run on a background thread. (Note: ShellExecuteEx runs on a background thread by default if the caller's threading model is not Apartment., Calls to ShellExecuteEx from processes already running on background threads should always pass this flag. Also, applications that exit immediately after calling ShellExecuteEx should specify this flag.
        /// If the execute operation is performed on a background thread and the caller did not specify the SEE_MASK_ASYNCOK flag, then the calling thread waits until the new process has started before returning. This typically means that either CreateProcess has been called, the DDE communication has completed, or that the custom execution delegate has notified ShellExecuteEx that it is done. If the SEE_MASK_WAITFORINPUTIDLE flag is specified, then ShellExecuteEx calls WaitForInputIdle and waits for the new process to idle before returning, with a maximum timeout of 1 minute.
        /// For further discussion on when this flag is necessary, see the Remarks section.
        /// </summary>
        SEE_MASK_NOASYNC = 0x00000100,

        /// <summary>
        /// Do not use; use SEE_MASK_NOASYNC instead.
        /// </summary>
        SEE_MASK_FLAG_DDEWAIT = 0x00000100,

        /// <summary>
        /// Expand any environment variables specified in the string given by the lpDirectory or lpFile member.
        /// </summary>
        SEE_MASK_DOENVSUBST = 0x00000200,

        /// <summary>
        /// Do not display an error message box if an error occurs.
        /// </summary>
        SEE_MASK_FLAG_NO_UI = 0x00000400,

        /// <summary>
        /// Use this flag to indicate a Unicode application.
        /// </summary>
        SEE_MASK_UNICODE = 0x00004000,

        /// <summary>
        /// Use to inherit the parent's console for the new process instead of having it create a new console. It is the opposite of using a CREATE_NEW_CONSOLE flag with CreateProcess.
        /// </summary>
        SEE_MASK_NO_CONSOLE = 0x00008000,

        /// <summary>
        /// The execution can be performed on a background thread and the call should return immediately without waiting for the background thread to finish. Note that in certain cases ShellExecuteEx ignores this flag and waits for the process to finish before returning.
        /// </summary>
        SEE_MASK_ASYNCOK = 0x00100000,

        /// <summary>
        /// Not used.
        /// </summary>
        SEE_MASK_NOQUERYCLASSSTORE = 0x01000000,

        /// <summary>
        /// Use this flag when specifying a monitor on multi-monitor systems. The monitor is specified in the hMonitor member. This flag cannot be combined with SEE_MASK_ICON.
        /// </summary>
        SEE_MASK_HMONITOR = 0x00200000,

        /// <summary>
        /// Introduced in Windows XP. Do not perform a zone check. This flag allows ShellExecuteEx to bypass zone checking put into place by IAttachmentExecute.
        /// </summary>
        SEE_MASK_NOZONECHECKS = 0x00800000,

        /// <summary>
        /// After the new process is created, wait for the process to become idle before returning, with a one minute timeout. See WaitForInputIdle for more details.
        /// </summary>
        SEE_MASK_WAITFORINPUTIDLE = 0x02000000,

        /// <summary>
        /// Introduced in Windows XP. Keep track of the number of times this application has been launched. Applications with sufficiently high counts appear in the Start Menu's list of most frequently used programs.
        /// </summary>
        SEE_MASK_FLAG_LOG_USAGE = 0x04000000,

        /// <summary>
        /// Introduced in Windows 8. The hInstApp member is used to specify the IUnknown of the object that will be used as a site pointer. The site pointer is used to provide services to the ShellExecute function, the handler binding process, and invoked verb handlers.
        /// </summary>
        SEE_MASK_FLAG_HINST_IS_SITE = 0x08000000,

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Dave Kerr
Software Developer
United Kingdom United Kingdom
Follow my blog at www.dwmkerr.com and find out about my charity at www.childrenshomesnepal.org.
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 20 May 2014
Article Copyright 2013 by Dave Kerr
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid