Click or drag to resize

ShellUtilities Class

A set of Windows Shell utilities.
Inheritance Hierarchy
SystemObject
  callback.ShellBoost.Core.UtilitiesShellUtilities

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static class ShellUtilities

The ShellUtilities type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddToBindCtx
Adds a name-value pair to an IBindCtx's property bag.
Public methodStatic memberChangeNotificationLock
Locks the shared memory associated with a Shell change notification event.
Public methodStatic memberChangeNotificationUnlock
Unlocks shared memory for a change notification.
Public methodStatic memberChangeNotify(SHCNE, SHCNF)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, ShellItemIdList)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, Int32)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, IntPtr)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, String)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, ShellItemIdList, ShellItemIdList)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, Int32, Int32)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, IntPtr, IntPtr)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotify(SHCNE, SHCNF, String, String)
Notifies the Shell of an event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotifyAllEvents
Notifies the Shell of the SHCNE_ALLEVENTS event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotifyAssocChanged
Notifies the Shell of the SHCNE_ASSOCCHANGED event. Wraps Windows Shell's SHChangeNotify function.
Public methodStatic memberChangeNotifyDeregister
Unregisters the client's window process from receiving ChangeNotify messages.
Public methodStatic memberChangeNotifyRegister
Registers a window to receive notifications from the file system or Shell, if the file system supports notifications.
Public methodStatic memberClearViewStatePropertyBag(IntPtr, String, Boolean)
Clears a property bag in which the view state information for a folder was stored. Note this method requires a STA thread to work.
Public methodStatic memberClearViewStatePropertyBag(IWithIdList, String, Boolean)
Clears a property bag in which the view state information for a folder was stored. Note this method requires a STA thread to work.
Public methodStatic memberCoAllowSetForegroundWindow
Passes the foreground privilege (the privilege to set the foreground window) from one process to another. Wraps Windows' CoAllowSetForegroundWindow function.
Public methodStatic memberCreateBindCtx(NullableSTGM, Boolean)
Returns an implementation of IBindCtx (a bind context object). This object stores information about a particular moniker-binding operation.
Public methodStatic memberCreateBindCtx(FileMode, FileAccess, FileShare, Boolean)
Returns an implementation of IBindCtx (a bind context object). This object stores information about a particular moniker-binding operation.
Public methodStatic memberCreateBindCtx(String, NullableSTGM, NullableInt64, NullableFileAttributes, NullableDateTime, NullableDateTime, NullableDateTime, Boolean)
Returns an implementation of IBindCtx (a bind context object) that doesn't need a an existing Shell Item for binding operations. Pass STGM_CREATE for mode parameter to create an item that doesn't necessarily exist.
Public methodStatic memberCreateDataObject(IEnumerableShellItemIdList, Boolean)
Creates a data object from a list of pidls.
Public methodStatic memberCreateDataObject(IEnumerableIntPtr, Boolean)
Creates a data object from a list of pidls.
Public methodStatic memberCreateDataObject(IEnumerableString, Boolean)
Creates a data object from a list of paths.
Public methodStatic memberCreateDataObject(IntPtr, Boolean)
Creates a data object from a pidl.
Public methodStatic memberCreateDataObject(ShellItemIdList, Boolean)
Creates a data object from a pidl.
Public methodStatic memberCreateDataObject(String, Boolean)
Creates a data object from a path.
Public methodStatic memberCreateInstance(Guid, Guid, CLSCTX, Boolean)
Creates an instance of a COM object.
Public methodStatic memberCreateInstanceT(Guid, CLSCTX, Boolean)
Creates an instance of a COM object.
Public methodStatic memberCreateMemoryStream
Creates a native memory stream using the SHCreateMemStream API.
Public methodStatic memberCreateNativeMemoryStream
Creates a native memory stream using the SHCreateMemStream native API.
Public methodStatic memberDestroyIcon
Destroys an icon and frees any memory the icon occupied.
Public methodStatic memberEnsureBindCtxPropertyBag(IBindCtx, Boolean)
Ensures an IBindCtx has a property bag.
Public methodStatic memberEnsureBindCtxPropertyBag(IBindCtx, Object, Boolean)
Ensures an IBindCtx has a property bag.
Public methodStatic memberEnumerateItems(ShellItemIdList, Boolean)
Enumerates child items of a given shell item.
Public methodStatic memberEnumerateItems(String, Boolean)
Enumerates child items of a given shell item.
Public methodStatic memberExtractIcon
Extracts an icon from a file (.ico, .exe, etc.)
Public methodStatic memberExtractIconsCount
Extracts the count of icons from a file (.ico, .exe, etc.)
Public methodStatic memberExtractMenu(IntPtr, Boolean)
Extracts a Windows menu information.
Public methodStatic memberExtractMenu(String, Boolean)
Extracts all menu items from a shell item's context menu.
Public methodStatic memberExtractMenu(String, ActionShellMenuItem, ShellMenuItem, Boolean)
Runs an action on all menu items from a shell item's context menu.
Public methodStatic memberExtractNewMenu(Boolean, Boolean)
Extracts information from the Windows Shell 'New' menu. Uses the TEMP directory to build the content of the 'New' menu.
Public methodStatic memberExtractNewMenu(ShellItemIdList, Boolean, Boolean)
Extracts information from the Windows Shell 'New' menu.
Public methodStatic memberExtractNewMenu(String, Boolean, Boolean)
Extracts information from the Windows Shell 'New' menu.
Public methodStatic memberFormatByteSize
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
Public methodStatic memberFromAttributes
Converts file attributes to SFGAO.
Public methodStatic memberGetApartmentState
Determines the state of the current thread's COM apartment
Public methodStatic memberGetBindOptions(IBindCtx, BIND_OPTS2, Boolean)
Returns the current binding options stored in a bind context.
Public methodStatic memberGetBindOptions(IBindCtx, BIND_OPTS3, Boolean)
Returns the current binding options stored in a bind context.
Public methodStatic memberGetFileSystemPath
Gets a corresponding file system path for a given PIDL.
Public methodStatic memberGetFolderLocation
Gets a known folder location as a PIDL.
Public methodStatic memberGetIconHandle
Gets an icon handle from a file path.
Public methodStatic memberGetIconHandleFromSystemImageList
Gets an icon handle from the system image list.
Public methodStatic memberGetIconLocation(String, String, Int32)
Gets the icon location from a shell item path.
Public methodStatic memberGetIconLocation(String, IBindCtx, GILIN, String, Int32, GILOUT)
Gets the icon location from a shell item path.
Public methodStatic memberGetIconLocationFromExtension(String, String, Int32)
Gets the icon location path and index from an extension.
Public methodStatic memberGetIconLocationFromExtension(String, IconMode, String, Int32)
Gets the icon location path and index from a file extension.
Public methodStatic memberGetIdList(String, IBindCtx, Boolean)
Gets the PIDL from a path.
Public methodStatic memberGetIdList(String, SFGAO, IBindCtx, Boolean)
Gets the PIDL from a path.
Public methodStatic memberGetImage(IntPtr, Size, SIIGBF, Boolean)
Gets a bitmap that represents a Shell Item. The default behavior is to load a thumbnail. If there is no thumbnail for the current IShellItem, it retrieves an HBITMAP for the icon of the item. The thumbnail or icon is extracted if it is not currently cached.
Public methodStatic memberGetImage(IWithIdList, Size, SIIGBF, Boolean)
Gets a bitmap that represents a Shell Item. The default behavior is to load a thumbnail. If there is no thumbnail for the current IShellItem, it retrieves an HBITMAP for the icon of the item. The thumbnail or icon is extracted if it is not currently cached.
Public methodStatic memberGetImageForExtension
Gets a bitmap that represents an extension.
Public methodStatic memberGetImageHandle(IntPtr, Size, SIIGBF, Boolean)
Gets an HBITMAP handle that represents a Shell Item. The default behavior is to load a thumbnail. If there is no thumbnail for the current IShellItem, it retrieves an HBITMAP for the icon of the item. The thumbnail or icon is extracted if it is not currently cached.
Public methodStatic memberGetImageHandle(IWithIdList, Size, SIIGBF, Boolean)
Gets an HBITMAP handle that represents a Shell Item. The default behavior is to load a thumbnail. If there is no thumbnail for the current IShellItem, it retrieves an HBITMAP for the icon of the item. The thumbnail or icon is extracted if it is not currently cached.
Public methodStatic memberGetKinds
Gets the available shell kinds for a given file extension.
Public methodStatic memberGetName
Gets the name of a shell item from its PIDL.
Public methodStatic memberGetPath
Gets the path of a PIDL.
Public methodStatic memberGetPerceivedType(String)
Gets the perceived type for a given file extension.
Public methodStatic memberGetPerceivedType(String, PERCEIVEDFLAG)
Gets the perceived type for a given file extension.
Public methodStatic memberGetPerceivedType(String, String)
Gets the perceived type for a given file extension.
Public methodStatic memberGetPerceivedType(String, PERCEIVEDFLAG, String)
Gets the perceived type for a given file extension.
Public methodStatic memberGetStorageMode
Gets COM storage mode from .NET constants.
Public methodStatic memberGetViewStatePropertyBagValue(IntPtr, String, String, SHGVSPB)
Retrieves a property bag in which the view state information for a folder can be stored and subsequently retrieved and get a value by its name from it. The user's settings are kept for the next time the user visits the folder.
Public methodStatic memberGetViewStatePropertyBagValue(IWithIdList, String, String, SHGVSPB)
Retrieves a property bag in which the view state information for a folder can be stored and subsequently retrieved and get a value by its name from it. The user's settings are kept for the next time the user visits the folder.
Public methodStatic memberInvokeMenuItem(String, FuncShellMenuItem, Boolean)
Invokes a shell item's context menu item.
Public methodStatic memberInvokeMenuItem(String, IntPtr, FuncShellMenuItem, Boolean, Boolean)
Invokes a shell item's context menu item.
Public methodStatic memberLoadIndirectString
Extracts a specified text resource when given that resource in the form of an indirect string (a string that begins with the '@' symbol).
Public methodStatic memberNoStrCmpLogical
If true, the system administrator has specified that filenames should be sorted with the StringCompare function instead of the StrCmpLogical function. Applications that sort filenames should sort accordingly.
Public methodStatic memberOleInitialize
Initializes the COM library on the current apartment, identifies the concurrency model as single-thread apartment (STA), and enables additional functionality such as Clipboard or Drag & Drop operations.
Public methodStatic memberOpenPropertySheet(IEnumerableShellItemIdList, String, Boolean)
Opens the property sheet from a list of pidls.
Public methodStatic memberOpenPropertySheet(IEnumerableIntPtr, String, Boolean)
Opens the property sheet from a list of pidls.
Public methodStatic memberOpenPropertySheet(IEnumerableString, String, Boolean)
Opens the property sheet from a list of paths.
Public methodStatic memberOpenPropertySheet(IntPtr, String, Boolean)
Opens the property sheet from a pidl.
Public methodStatic memberOpenPropertySheet(ShellItemIdList, String, Boolean)
Opens the property sheet from a pidl.
Public methodStatic memberOpenPropertySheet(String, String, Boolean)
Opens the property sheet from a path.
Public methodStatic memberOpenPropertySheet(IDataObject, String, IEnumerableIntPtr, NullableGuid, String)
Opens the property sheet from a data object.
Public methodStatic memberParseIconLocationPath
Parses an icon location string to extract the icon file path and the icon index.
Public methodStatic memberRefreshShellViews
Refreshes all Windows Shell views.
Public methodStatic memberResetThumbnails
Resets all Windows Shell thumbnails and wait for completion.
Public methodStatic memberResetThumbnails(Boolean)
Resets all Windows Shell thumbnails.
Public methodStatic memberSetAccessibleName
Sets text that is retrieved by accessibility tools to obtain the Name Property of an object.
Public methodStatic memberSetBindOptions(IBindCtx, BIND_OPTS2, Boolean)
Stores a block of parameters in a bind context. These parameters will apply to later UCOMIMoniker operations that use this bind context.
Public methodStatic memberSetBindOptions(IBindCtx, BIND_OPTS3, Boolean)
Stores a block of parameters in a bind context. These parameters will apply to later UCOMIMoniker operations that use this bind context.
Public methodStatic memberSetViewStatePropertyBagValue(IntPtr, String, String, Object, SHGVSPB, Boolean)
Retrieves a property bag in which the view state information for a folder can be stored and subsequently retrieved and write a value by its name to it. The user's settings are kept for the next time the user visits the folder. Note this method requires a STA thread to work.
Public methodStatic memberSetViewStatePropertyBagValue(IWithIdList, String, String, Object, SHGVSPB, Boolean)
Retrieves a property bag in which the view state information for a folder can be stored and subsequently retrieved and write a value by its name to it. The user's settings are kept for the next time the user visits the folder. Note this method requires a STA thread to work.
Public methodStatic memberShellStringCompare
Compares two strings. This test is not case-sensitive. Depending on machine's configuration, the comparison can be using the StrCmpLogicalW (the default) or the StrCmpI native function.
Public methodStatic memberStringCompareLogical
Compares two strings. Digits in the strings are considered as numerical content rather than text. This test is not case-sensitive.
Public methodStatic memberWithSite(Object, Object, Action, Boolean)
Runs an action. If the sited object implements IObjectWithSite, the site object will be set before the action and unset after the action.
Public methodStatic memberWithSiteT(Object, Object, FuncT, Boolean)
Runs an function. If the sited object implements IObjectWithSite, the site object will be set before the function and unset after the function.
Top
Fields
  NameDescription
Public fieldStatic memberE_ACCESSDENIED
The Windows E_ACCESSDENIED error value (0x80070005).
Public fieldStatic memberE_ALREADY_EXISTS
The Windows E_ALREADY_EXISTS error value (0x800700B7).
Public fieldStatic memberE_CANCELLED
The Windows E_CANCELLED error value (0x800704C7).
Public fieldStatic memberE_FAIL
The Windows E_FAIL error value (0x80004005).
Public fieldStatic memberE_FILE_NOT_FOUND
The Windows E_FILE_NOT_FOUND error value (0x80070002).
Public fieldStatic memberE_INVALIDARG
The Windows E_INVALIDARG error value (0x80070057).
Public fieldStatic memberE_NOINTERFACE
The Windows E_NOINTERFACE error value (0x80004002).
Public fieldStatic memberE_NOTFOUND
The Windows E_NOTFOUND error value (0x80070490).
Public fieldStatic memberE_NOTIMPL
The Windows E_NOTIMPL error value (0x80004001).
Public fieldStatic memberE_OUTOFMEMORY
The Windows E_OUTOFMEMORY error value (0x8007000E).
Public fieldStatic memberE_PATH_NOT_FOUND
The Windows E_PATH_NOT_FOUND error value (0x80070003).
Public fieldStatic memberE_PENDING
The Windows E_PENDING error value (0x8000000A).
Public fieldStatic memberERROR_MORE_DATA
The Windows ERROR_MORE_DATA error value (0x800700EA).
Public fieldStatic memberERROR_NOT_SUPPORTED
The Windows ERROR_NOT_SUPPORTED error value (0x80070032).
Public fieldStatic memberERROR_RETRY
The Windows ERROR_RETRY error value (0x800704D5).
Public fieldStatic memberIID_IDispatch
The IDispatch IID (00020400-0000-0000-c000-000000000046).
Public fieldStatic memberIID_IInspectable
The IInspectable IID (af86e2e0-b12d-4c6a-9c5a-d7aa65101e90).
Public fieldStatic memberIID_IUnknown
The IUnknown IID (00000000-0000-0000-c000-000000000046).
Public fieldStatic memberS_FALSE
The Windows S_FALSE value (1).
Public fieldStatic memberS_OK
The Windows S_OK value (0).
Public fieldStatic memberSTG_E_ACCESSDENIED
The Windows STG_E_ACCESSDENIED error value (0x80030005).
Top
See Also