using System; using System.Collections; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using System.Security; namespace Vanara.PInvoke { public static partial class Shell32 { /// Specifies values used by IAutoComplete2::GetOptions and IAutoComplete2::SetOptions for options surrounding autocomplete. [Flags] public enum AUTOCOMPLETEOPTIONS { /// Do not autocomplete. ACO_NONE = 0, /// Enable the autosuggest drop-down list. ACO_AUTOSUGGEST = 0x1, /// Enable autoappend. ACO_AUTOAPPEND = 0x2, /// Add a search item to the list of completed strings. When the user selects this item, it launches a search engine. ACO_SEARCH = 0x4, /// Do not match common prefixes, such as "www." or "http://". ACO_FILTERPREFIXES = 0x8, /// Use the TAB key to select an item from the drop-down list. ACO_USETAB = 0x10, /// Use the UP ARROW and DOWN ARROW keys to display the autosuggest drop-down list. ACO_UPDOWNKEYDROPSLIST = 0x20, /// /// Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that /// read right-to-left (RTL). Typically, control text is displayed in the same direction as the text in its parent window. If /// ACO_RTLREADING is set, the text reads in the opposite direction from the text in the parent window. /// ACO_RTLREADING = 0x40, /// /// Windows Vista and later. If set, the autocompleted suggestion is treated as a phrase for search purposes. The suggestion, /// Microsoft Office, would be treated as "Microsoft Office" (where both Microsoft AND Office must appear in the search results). /// ACO_WORD_FILTER = 0x80, /// /// Windows Vista and later. Disable prefix filtering when displaying the autosuggest dropdown. Always display all suggestions. /// ACO_NOPREFIXFILTERING = 0x100 } /// The offline status of the folder. [PInvokeData("shldisp.h")] [Guid("35F1A0D0-3E9A-11D2-8499-005345000000")] public enum OfflineFolderStatus { /// Server is online with unsynchronized changes. OFS_DIRTYCACHE = 3, /// Offline caching is not enabled for this folder. OFS_INACTIVE = -1, /// Server is offline. OFS_OFFLINE = 1, /// Server is online. OFS_ONLINE = 0, /// Server is offline but can be reached. OFS_SERVERBACK = 2 } /// Specifies the view options returned by the ViewOptions property. // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/ne-shldisp-shellfolderviewoptions typedef enum ShellFolderViewOptions { // SFVVO_SHOWALLOBJECTS, SFVVO_SHOWEXTENSIONS, SFVVO_SHOWCOMPCOLOR, SFVVO_SHOWSYSFILES, SFVVO_WIN95CLASSIC, // SFVVO_DOUBLECLICKINWEBVIEW, SFVVO_DESKTOPHTML } ; [PInvokeData("shldisp.h", MSDNShortId = "7028ff38-7596-4126-aa98-c0be519243c9")] [Guid("742A99A0-C77E-11D0-A32C-00A0C91EEDBA")] [Flags] public enum ShellFolderViewOptions { /// The Active Desktop – View as Web Page option is enabled. SFVVO_DESKTOPHTML = 0x200, /// The Double-Click to Open an Item option is enabled. SFVVO_DOUBLECLICKINWEBVIEW = 0x80, /// The Show All Files option is enabled. SFVVO_SHOWALLOBJECTS = 1, /// The Display Compressed Files and Folders with Alternate Color option is enabled. SFVVO_SHOWCOMPCOLOR = 8, /// The Hide extensions for known file types option is disabled. SFVVO_SHOWEXTENSIONS = 2, /// The Do Not Show Hidden Files option is enabled. SFVVO_SHOWSYSFILES = 0x20, /// The Classic Style option is enabled. SFVVO_WIN95CLASSIC = 0x40 } /// /// Specifies unique, system-independent values that identify special folders. These folders are frequently used by applications but /// which may not have the same name or location on any given system. For example, the system folder can be "C:\Windows" on one /// system and "C:\Winnt" on another. /// /// /// /// The values in this enumeration are equivalent to their corresponding CSIDL or KNOWNFOLDERID values, used in C++ applications. /// They supersede the use of environment variables for this purpose. Note that not all CSIDL or KNOWNFOLDERID values /// have an equivalent value in ShellSpecialFolderConstants. /// /// /// Note Where a constant identifies a file system folder, a commonly used path on Windows Vista systems is given as an /// example. However, there is no guarantee that this path will be used on any particular system, including Windows Vista systems. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/ne-shldisp-shellspecialfolderconstants typedef enum // ShellSpecialFolderConstants { ssfDESKTOP, ssfPROGRAMS, ssfCONTROLS, ssfPRINTERS, ssfPERSONAL, ssfFAVORITES, ssfSTARTUP, ssfRECENT, // ssfSENDTO, ssfBITBUCKET, ssfSTARTMENU, ssfDESKTOPDIRECTORY, ssfDRIVES, ssfNETWORK, ssfNETHOOD, ssfFONTS, ssfTEMPLATES, // ssfCOMMONSTARTMENU, ssfCOMMONPROGRAMS, ssfCOMMONSTARTUP, ssfCOMMONDESKTOPDIR, ssfAPPDATA, ssfPRINTHOOD, ssfLOCALAPPDATA, // ssfALTSTARTUP, ssfCOMMONALTSTARTUP, ssfCOMMONFAVORITES, ssfINTERNETCACHE, ssfCOOKIES, ssfHISTORY, ssfCOMMONAPPDATA, ssfWINDOWS, // ssfSYSTEM, ssfPROGRAMFILES, ssfMYPICTURES, ssfPROFILE, ssfSYSTEMx86, ssfPROGRAMFILESx86 } ; [PInvokeData("shldisp.h", MSDNShortId = "35338102-f3a9-4bcf-ad62-d395462e6d2c")] [Guid("CA31EA20-48D0-11CF-8350-444553540000")] public enum ShellSpecialFolderConstants { /// 0x00 (0). Windows desktop—the virtual folder that is the root of the namespace. ssfDESKTOP = 0, /// /// 0x02 (2). File system directory that contains the user's program groups (which are also file system directories). A typical /// path is C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs. /// ssfPROGRAMS = 2, /// 0x03 (3). Virtual folder that contains icons for the Control Panel applications. ssfCONTROLS, /// 0x04 (4). Virtual folder that contains installed printers. ssfPRINTERS, /// /// 0x05 (5). File system directory that serves as a common repository for a user's documents. A typical path is C:\Users\username\Documents. /// ssfPERSONAL, /// /// 0x06 (6). File system directory that serves as a common repository for the user's favorite URLs. A typical path is /// C:\Documents and Settings\username\Favorites. /// ssfFAVORITES, /// /// 0x07 (7). File system directory that corresponds to the user's Startup program group. The system starts these programs /// whenever any user first logs into their profile after a reboot. A typical path is /// C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\StartUp. /// ssfSTARTUP, /// 0x08 (8). File system directory that contains the user's most recently used documents. A typical path is C:\Users\username\AppData\Roaming\Microsoft\Windows\Recent. ssfRECENT, /// 0x09 (9). File system directory that contains Send To menu items. A typical path is C:\Users\username\AppData\Roaming\Microsoft\Windows\SendTo. ssfSENDTO, /// 0x0a (10). Virtual folder that contains the objects in the user's Recycle Bin. ssfBITBUCKET, /// /// 0x0b (11). File system directory that contains Start menu items. A typical path is /// C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu. /// ssfSTARTMENU, /// /// 0x10 (16). File system directory used to physically store the file objects that are displayed on the desktop. It is not to be /// confused with the desktop folder itself, which is a virtual folder. A typical path is C:\Documents and Settings\username\Desktop. /// ssfDESKTOPDIRECTORY = 16, /// /// 0x11 (17). My Computer—the virtual folder that contains everything on the local computer: storage devices, printers, and /// Control Panel. This folder can also contain mapped network drives. /// ssfDRIVES, /// 0x12 (18). Network Neighborhood—the virtual folder that represents the root of the network namespace hierarchy. ssfNETWORK, /// /// 0x13 (19). A file system folder that contains any link objects in the My Network Places virtual folder. It is not the same as /// ssfNETWORK, which represents the network namespace root. A typical path is /// C:\Users\username\AppData\Roaming\Microsoft\Windows\Network Shortcuts. /// ssfNETHOOD, /// 0x14 (20). Virtual folder that contains installed fonts. A typical path is C:\Windows\Fonts. ssfFONTS, /// 0x15 (21). File system directory that serves as a common repository for document templates. ssfTEMPLATES, /// /// 0x16 (22). File system directory that contains the programs and folders that appear on the Start menu for all users. A /// typical path is C:\Documents and Settings\All Users\Start Menu. Valid only for Windows NT systems. /// ssfCOMMONSTARTMENU, /// /// 0x17 (23). File system directory that contains the directories for the common program groups that appear on the Start menu /// for all users. A typical path is C:\Documents and Settings\All Users\Start Menu\Programs. Valid only for Windows NT systems. /// ssfCOMMONPROGRAMS, /// /// 0x18 (24). File system directory that contains the programs that appear in the Startup folder for all users. A typical path /// is C:\Documents and Settings\All Users\Microsoft\Windows\Start Menu\Programs\StartUp. Valid only for Windows NT systems. /// ssfCOMMONSTARTUP, /// /// 0x19 (25). File system directory that contains files and folders that appear on the desktop for all users. A typical path is /// C:\Documents and Settings\All Users\Desktop. Valid only for Windows NT systems. /// ssfCOMMONDESKTOPDIR, /// /// 0x1a (26). Version 4.71. File system directory that serves as a common repository for application-specific data. A typical /// path is C:\Documents and Settings\username\Application Data. /// ssfAPPDATA, /// /// 0x1b (27). File system directory that contains any link objects in the Printers virtual folder. A typical path is /// C:\Users\username\AppData\Roaming\Microsoft\Windows\Printer Shortcuts. /// ssfPRINTHOOD, /// /// 0x1c (28). Version 5.0. File system directory that serves as a data repository for local (non-roaming) applications. A /// typical path is C:\Users\username\AppData\Local. /// ssfLOCALAPPDATA, /// 0x1d (29). File system directory that corresponds to the user's non-localized Startup program group. ssfALTSTARTUP, /// /// 0x1e (30). File system directory that corresponds to the non-localized Startup program group for all users. Valid only for /// Windows NT systems. /// ssfCOMMONALTSTARTUP, /// /// 0x1f (31). File system directory that serves as a common repository for the favorite URLs shared by all users. Valid only for /// Windows NT systems. /// ssfCOMMONFAVORITES, /// /// 0x20 (32). File system directory that serves as a common repository for temporary Internet files. A typical path is /// C:\Users\username\AppData\Local\Microsoft\Windows\Temporary Internet Files. /// ssfINTERNETCACHE, /// /// 0x21 (33). File system directory that serves as a common repository for Internet cookies. A typical path is C:\Documents and /// Settings\username\Application Data\Microsoft\Windows\Cookies. /// ssfCOOKIES, /// 0x22 (34). File system directory that serves as a common repository for Internet history items. ssfHISTORY, /// /// 0x23 (35). Version 5.0. Application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data. /// ssfCOMMONAPPDATA, /// /// 0x24 (36). Version 5.0. Windows directory. This corresponds to the %windir% or %SystemRoot% environment variables. A typical /// path is C:\Windows. /// ssfWINDOWS, /// 0x25 (37). Version 5.0. The System folder. A typical path is C:\Windows\System32. ssfSYSTEM, /// 0x26 (38). Version 5.0. Program Files folder. A typical path is C:\Program Files. ssfPROGRAMFILES, /// 0x27 (39). My Pictures folder. A typical path is C:\Users\username\Pictures. ssfMYPICTURES, /// 0x28 (40). Version 5.0. User's profile folder. ssfPROFILE, /// /// 0x29 (41). Version 5.0. System folder. A typical path is C:\Windows\System32, or C:\Windows\Syswow32 on a 64-bit computer. /// ssfSYSTEMx86, /// /// 0x30 (48). Version 6.0. Program Files folder. A typical path is C:\Program Files, or C:\Program Files (X86) on a 64-bit computer. /// ssfPROGRAMFILESx86 = 48, } /// Undocumented. [ComImport, Guid("4A3DF050-23BD-11D2-939F-00A0C91EEDBA")] public interface DFConstraint { /// Undocumented. [DispId(0x60020000)] string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Undocumented. [DispId(0x60020001)] object Value { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } } /// Undocumented. [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIDispatch), Guid("62112AA2-EBE4-11CF-A5FB-0020AFE7292D"), CoClass(typeof(ShellFolderView))] public interface DShellFolderViewEvents { /// Undocumented. [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(200)] void SelectionChanged(); /// Undocumented. [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0xc9)] void EnumDone(); /// Undocumented. [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0xca)] bool VerbInvoked(); /// Undocumented. [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0xcb)] bool DefaultVerbInvoked(); /// Undocumented. [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0xcc)] bool BeginDrag(); } /// /// Represents a Shell folder. This object contains properties and methods that allow you to retrieve information about the folder. /// [PInvokeData("Shldisp.h")] [ComImport, Guid("BBCBDE60-C3FF-11CE-8350-444553540000"), DefaultMember("Title")] public interface Folder { /// Contains the title of the folder. /// Returns a value. [DispId(0)] string Title { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; } /// Contains the folder's Application object. /// An object reference to the Application object. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser control, if /// that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance /// of the Internet Explorer application. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020001)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Contains the parent Folder object. /// An object reference to the ParentFolder object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020003)] Folder ParentFolder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] get; } /// Retrieves a FolderItems object that represents the collection of items in the folder. /// An object reference to the FolderItems object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] FolderItems Items(); /// Creates and returns a FolderItem object that represents a specified item. /// A string that specifies the name of the item. /// An object reference to the FolderItem object. /// ParseName should not be used for virtual folders such as My Documents. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] FolderItem ParseName([In, MarshalAs(UnmanagedType.BStr)] string bName); /// Creates a new folder. /// A string that specifies the name of the new folder. /// This value is not currently used. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] void NewFolder([In, MarshalAs(UnmanagedType.BStr)] string bName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOptions); /// Moves an item or items to this folder. /// /// The item or items to move. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the move operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. These flags are not defined as such for /// Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] void MoveHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Copies an item or items to a folder. /// /// The item or items to copy. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the copy operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. Each Shell namespace must provide its own /// implementation of these flags, and each namespace can choose to ignore some or even all of these flags. These flags are not /// defined by name for Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] void CopyHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Retrieves details about an item in a folder. For example, its size, type, or the time of its last modification. /// The item for which to retrieve the information. This must be a FolderItem object. /// /// An Integer value that specifies the information to be retrieved. The information available for an item depends on the folder /// in which it is displayed. This value corresponds to the zero-based column number that is displayed in a Shell view. /// /// String containing the retrieved detail. [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] string GetDetailsOf([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In] int iColumn); } /// Extends the Folder object to support offline folders. [PInvokeData("Shldisp.h")] [ComImport, Guid("F0D2D8EF-3890-11D2-BF8B-00C04FB93661"), DefaultMember("Title")] public interface Folder2 : Folder { /// Contains the title of the folder. /// Returns a value. [DispId(0)] new string Title { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; } /// Contains the folder's Application object. /// An object reference to the Application object. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser control, if /// that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance /// of the Internet Explorer application. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020001)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Contains the parent Folder object. /// An object reference to the ParentFolder object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020003)] new Folder ParentFolder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] get; } /// Retrieves a FolderItems object that represents the collection of items in the folder. /// An object reference to the FolderItems object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new FolderItems Items(); /// Creates and returns a FolderItem object that represents a specified item. /// A string that specifies the name of the item. /// An object reference to the FolderItem object. /// ParseName should not be used for virtual folders such as My Documents. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new FolderItem ParseName([In, MarshalAs(UnmanagedType.BStr)] string bName); /// Creates a new folder. /// A string that specifies the name of the new folder. /// This value is not currently used. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void NewFolder([In, MarshalAs(UnmanagedType.BStr)] string bName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOptions); /// Moves an item or items to this folder. /// /// The item or items to move. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the move operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. These flags are not defined as such for /// Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MoveHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Copies an item or items to a folder. /// /// The item or items to copy. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the copy operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. Each Shell namespace must provide its own /// implementation of these flags, and each namespace can choose to ignore some or even all of these flags. These flags are not /// defined by name for Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void CopyHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Retrieves details about an item in a folder. For example, its size, type, or the time of its last modification. /// The item for which to retrieve the information. This must be a FolderItem object. /// /// An Integer value that specifies the information to be retrieved. The information available for an item depends on the folder /// in which it is displayed. This value corresponds to the zero-based column number that is displayed in a Shell view. /// /// String containing the retrieved detail. [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new string GetDetailsOf([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In] int iColumn); /// Contains the folder's FolderItem object. /// The object that evaluates to the folder's FolderItem object. [DispId(0x60030000)] FolderItem Self { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] get; } /// Contains the offline status of the folder. /// Returns a value. [DispId(0x60030001)] OfflineFolderStatus OfflineStatus { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] get; } /// Synchronizes all offline files in the folder. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] void Synchronize(); /// This property is not supported. /// if [have to show web view barricade]; otherwise, . [DispId(1)] bool HaveToShowWebViewBarricade { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; } /// Called in response to the web view barricade being dismissed by the user. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] void DismissedWebViewBarricade(); } /// Extends the Folder object to support offline folders. [PInvokeData("Shldisp.h")] [ComImport, DefaultMember("Title"), Guid("A7AE5F64-C4D7-4D7F-9307-4D24EE54B841")] public interface Folder3 : Folder2 { /// Contains the title of the folder. /// Returns a value. [DispId(0)] new string Title { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; } /// Contains the folder's Application object. /// An object reference to the Application object. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser control, if /// that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance /// of the Internet Explorer application. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020001)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Contains the parent Folder object. /// An object reference to the ParentFolder object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [DispId(0x60020003)] new Folder ParentFolder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] get; } /// Retrieves a FolderItems object that represents the collection of items in the folder. /// An object reference to the FolderItems object. /// /// Not all methods are implemented for all folders. For example, the ParseName method is not implemented for /// the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error /// is raised. /// [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new FolderItems Items(); /// Creates and returns a FolderItem object that represents a specified item. /// A string that specifies the name of the item. /// An object reference to the FolderItem object. /// ParseName should not be used for virtual folders such as My Documents. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new FolderItem ParseName([In, MarshalAs(UnmanagedType.BStr)] string bName); /// Creates a new folder. /// A string that specifies the name of the new folder. /// This value is not currently used. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void NewFolder([In, MarshalAs(UnmanagedType.BStr)] string bName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOptions); /// Moves an item or items to this folder. /// /// The item or items to move. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the move operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. These flags are not defined as such for /// Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MoveHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Copies an item or items to a folder. /// /// The item or items to copy. This can be a string that represents a file name, a FolderItem object, or a FolderItems object. /// /// /// Options for the copy operation. This value can be zero or a combination of the following values. These values are based upon /// flags defined for use with the fFlags member of the C++ SHFILEOPSTRUCT structure. Each Shell namespace must provide its own /// implementation of these flags, and each namespace can choose to ignore some or even all of these flags. These flags are not /// defined by name for Visual Basic, VBScript, or JScript, so you must define them yourself or use their numeric equivalents. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void CopyHere([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] FILEOP_FLAGS vOptions); /// Retrieves details about an item in a folder. For example, its size, type, or the time of its last modification. /// The item for which to retrieve the information. This must be a FolderItem object. /// /// An Integer value that specifies the information to be retrieved. The information available for an item depends on the folder /// in which it is displayed. This value corresponds to the zero-based column number that is displayed in a Shell view. /// /// String containing the retrieved detail. [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new string GetDetailsOf([In, MarshalAs(UnmanagedType.Struct)] object vItem, [In] int iColumn); /// Contains the folder's FolderItem object. /// The object that evaluates to the folder's FolderItem object. [DispId(0x60030000)] new FolderItem Self { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] get; } /// Contains the offline status of the folder. /// Returns a value. [DispId(0x60030001)] new OfflineFolderStatus OfflineStatus { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] get; } /// Synchronizes all offline files in the folder. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void Synchronize(); /// This property is not supported. /// if [have to show web view barricade]; otherwise, . [DispId(1)] new bool HaveToShowWebViewBarricade { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; } /// Called in response to the web view barricade being dismissed by the user. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] new void DismissedWebViewBarricade(); /// Gets or sets a value indicating whether to show web view barricade. [DispId(2)] bool ShowWebViewBarricade { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; } } /// /// Represents an item in a Shell folder. This object contains properties and methods that allow you to retrieve information about /// the item. /// [PInvokeData("Shldisp.h")] [ComImport, Guid("FAC32C80-CBE4-11CE-8350-444553540000"), DefaultMember("Name"), CoClass(typeof(ShellFolderItem))] public interface FolderItem { /// Contains the Application object of the folder item. /// A variable of type IDispatch that receives the Application object. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser control, if /// that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance /// of the Internet Explorer application. /// /// [DispId(0x60020000)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Gets an object that represents the parent of the item. /// A variable of type IDispatch that receives the parent object. [DispId(0x60020001)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Gets or sets the item's name. /// A variable of type BSTR that specifies or receives the item's name. [DispId(0)] string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] set; } /// Contains the item's full path and name. /// A variable of type BSTR that receives the item's full path and name. [DispId(0x60020004)] string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; } /// Contains the item's ShellLinkObject object, if the item is a shortcut. /// A variable of type IDispatch that receives the ShellLinkObject object. [DispId(0x60020005)] object GetLink { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] get; } /// Contains the item's Folder object, if the item is a folder. /// A variable of type IDispatch that receives the Folder object. [DispId(0x60020006)] object GetFolder { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] get; } /// Indicates whether the item is a shortcut. /// A Boolean that receives if the item is a shortcut or if not. [DispId(0x60020007)] bool IsLink { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] get; } /// Indicates if the item is a folder. /// A Boolean that receives if the item is a folder or if not. [DispId(0x60020008)] bool IsFolder { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; } /// Indicates if the item is part of the file system. /// /// A Boolean that receives if the item is part of the file system or if not. /// [DispId(0x60020009)] bool IsFileSystem { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] get; } /// Indicates if the item can be hosted inside a browser or Windows Explorer frame. /// A Boolean that receives if the item can be browsed or if not. [DispId(0x6002000a)] bool IsBrowsable { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] get; } /// /// For a file, sets or gets the date and time that it was last modified. For a folder, retrieves the date and time that a folder /// was last modified, but cannot set it. /// /// Date that specifies or receives the date and time that the item was last modified. [DispId(0x6002000b)] DateTime ModifyDate { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] set; } /// Contains the item's size. /// An Integer that receives the item's size. [DispId(0x6002000d)] int Size { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] get; } /// Contains a string representation of the item's type. /// A variable of type BSTR that receives the item's type. [DispId(0x6002000e)] string Type { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] get; } /// /// Retrieves the item's FolderItemVerbs object. This object is the collection of verbs that can be executed on the item. /// /// An object reference to the FolderItemVerbs object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] FolderItemVerbs Verbs(); /// Executes a verb on the item. /// /// A string that specifies the verb to be executed. It must be one of the values returned by the item's FolderItemVerb.Name /// property. If no verb is specified, the default verb will be invoked. /// /// /// A verb is a string used to specify a particular action that an item supports. Invoking a verb is equivalent to selecting a /// command from an item's shortcut menu. Typically, invoking a verb launches a related application. For example, invoking the /// "open" verb on a .txt file opens the file with a text editor, usually Microsoft Notepad. See Launching Applications for /// further discussion of verbs. /// /// The FolderItemVerbs object represents the collection of verbs associated with the item.The default verb may vary for /// different items, but it is typically "open". /// /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] void InvokeVerb([In, Optional, MarshalAs(UnmanagedType.Struct)] string vVerb); } /// Extends the FolderItems object. It supports one additional method. [PInvokeData("Shldisp.h")] [ComImport, DefaultMember("Name"), Guid("EDC817AA-92B8-11D1-B075-00C04FC33AA5"), CoClass(typeof(ShellFolderItem))] public interface FolderItem2 : FolderItem { /// Contains the Application object of the folder item. /// A variable of type IDispatch that receives the Application object. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser control, if /// that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance /// of the Internet Explorer application. /// /// [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Gets an object that represents the parent of the item. /// A variable of type IDispatch that receives the parent object. [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Gets or sets the item's name. /// A variable of type BSTR that specifies or receives the item's name. [DispId(0)] new string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] set; } /// Contains the item's full path and name. /// A variable of type BSTR that receives the item's full path and name. [DispId(0x60020004)] new string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; } /// Contains the item's ShellLinkObject object, if the item is a shortcut. /// A variable of type IDispatch that receives the ShellLinkObject object. [DispId(0x60020005)] new object GetLink { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] get; } /// Contains the item's Folder object, if the item is a folder. /// A variable of type IDispatch that receives the Folder object. [DispId(0x60020006)] new object GetFolder { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] get; } /// Indicates whether the item is a shortcut. /// A Boolean that receives if the item is a shortcut or if not. [DispId(0x60020007)] new bool IsLink { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] get; } /// Indicates if the item is a folder. /// A Boolean that receives if the item is a folder or if not. [DispId(0x60020008)] new bool IsFolder { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; } /// Indicates if the item is part of the file system. /// /// A Boolean that receives if the item is part of the file system or if not. /// [DispId(0x60020009)] new bool IsFileSystem { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] get; } /// Indicates if the item can be hosted inside a browser or Windows Explorer frame. /// A Boolean that receives if the item can be browsed or if not. [DispId(0x6002000a)] new bool IsBrowsable { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] get; } /// /// For a file, sets or gets the date and time that it was last modified. For a folder, retrieves the date and time that a folder /// was last modified, but cannot set it. /// /// Date that specifies or receives the date and time that the item was last modified. [DispId(0x6002000b)] new DateTime ModifyDate { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] set; } /// Contains the item's size. /// An Integer that receives the item's size. [DispId(0x6002000d)] new int Size { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] get; } /// Contains a string representation of the item's type. /// A variable of type BSTR that receives the item's type. [DispId(0x6002000e)] new string Type { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] get; } /// /// Retrieves the item's FolderItemVerbs object. This object is the collection of verbs that can be executed on the item. /// /// An object reference to the FolderItemVerbs object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new FolderItemVerbs Verbs(); /// Executes a verb on the item. /// /// A string that specifies the verb to be executed. It must be one of the values returned by the item's FolderItemVerb.Name /// property. If no verb is specified, the default verb will be invoked. /// /// /// A verb is a string used to specify a particular action that an item supports. Invoking a verb is equivalent to selecting a /// command from an item's shortcut menu. Typically, invoking a verb launches a related application. For example, invoking the /// "open" verb on a .txt file opens the file with a text editor, usually Microsoft Notepad. See Launching Applications for /// further discussion of verbs. /// /// The FolderItemVerbs object represents the collection of verbs associated with the item.The default verb may vary for /// different items, but it is typically "open". /// /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void InvokeVerb([In, Optional, MarshalAs(UnmanagedType.Struct)] string vVerb); /// /// Executes a verb on a collection of FolderItem objects. This method is an extension of the InvokeVerb method, allowing /// additional control of the operation through a set of flags. /// /// /// A Variant with the verb string that corresponds to the command to be executed. If no verb is specified, the default verb is executed. /// /// /// A Variant that consists of a string with one or more arguments to the command specified by vVerb. The format of this string /// depends on the particular verb. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] void InvokeVerbEx([In, Optional, MarshalAs(UnmanagedType.Struct)] string vVerb, [In, Optional, MarshalAs(UnmanagedType.Struct)] string vArgs); /// Access an extended property /// Name of the property. /// Property value. [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] object ExtendedProperty([In, MarshalAs(UnmanagedType.BStr)] string bstrPropName); } /// /// Represents the collection of items in a Shell folder. This object contains properties and methods that allow you to retrieve /// information about the collection. /// [PInvokeData("Shldisp.h")] [ComImport, Guid("744129E0-CBE5-11CE-8350-444553540000")] public interface FolderItems { /// Contains the number of items in the collection. /// An Integer that contains a value for the Count property. [DispId(0x60020000)] int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Contains the Application object of the folder items collection. /// An object reference to the Application object. [DispId(0x60020001)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Retrieves the FolderItem object for a specified item in the collection. /// The zero-based index of the item to retrieve. This value must be less than the value of the Count property. /// An object reference to the FolderItem object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] FolderItem Item([In, Optional, MarshalAs(UnmanagedType.Struct)] int index); /// Creates and returns a new FolderItems object that is a copy of this FolderItemsss object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(-4)] object _NewEnum(); } /// Extends the FolderItems object. It supports one additional method. /// [PInvokeData("Shldisp.h")] [ComImport, Guid("C94F0AD0-F363-11D2-A327-00C04F8EEC7F")] public interface FolderItems2 : FolderItems { /// Contains the number of items in the collection. /// An Integer that contains a value for the Count property. [DispId(0x60020000)] new int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Contains the Application object of the folder items collection. /// An object reference to the Application object. [DispId(0x60020001)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Retrieves the FolderItem object for a specified item in the collection. /// The zero-based index of the item to retrieve. This value must be less than the value of the Count property. /// An object reference to the FolderItem object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new FolderItem Item([In, Optional, MarshalAs(UnmanagedType.Struct)] int index); /// Creates and returns a new FolderItems object that is a copy of this FolderItemsss object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(-4)] new object _NewEnum(); /// /// Executes a verb on a collection of FolderItem objects. This method is an extension of the InvokeVerb method, allowing /// additional control of the operation through a set of flags. /// /// /// A Variant with the verb string that corresponds to the command to be executed. If no verb is specified, the default verb is executed. /// /// /// A Variant that consists of a string with one or more arguments to the command specified by vVerb. The format of this string /// depends on the particular verb. /// /// /// A verb is a string used to specify a particular action associated with an item or collection of items. Typically, calling a /// verb launches a related application. For example, calling the open verb on a .txt file normally opens the file with a text /// editor, usually Microsoft Notepad. For further discussion of verbs, see Launching Applications. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] void InvokeVerbEx([In, Optional, MarshalAs(UnmanagedType.Struct)] string vVerb, [In, Optional, MarshalAs(UnmanagedType.Struct)] string vArgs); } /// Extends the FolderItems2 object. This object supports an additional method and property. /// [PInvokeData("Shldisp.h")] [ComImport, Guid("EAA7C309-BBEC-49D5-821D-64D966CB667F"), DefaultMember("Verbs")] public interface FolderItems3 : FolderItems2 { /// Contains the number of items in the collection. /// An Integer that contains a value for the Count property. [DispId(0x60020000)] new int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// Contains the Application object of the folder items collection. /// An object reference to the Application object. [DispId(0x60020001)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. [DispId(0x60020002)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Retrieves the FolderItem object for a specified item in the collection. /// The zero-based index of the item to retrieve. This value must be less than the value of the Count property. /// An object reference to the FolderItem object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new FolderItem Item([In, Optional, MarshalAs(UnmanagedType.Struct)] int index); /// Creates and returns a new FolderItems object that is a copy of this FolderItemsss object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(-4)] new object _NewEnum(); /// /// Executes a verb on a collection of FolderItem objects. This method is an extension of the InvokeVerb method, allowing /// additional control of the operation through a set of flags. /// /// /// A Variant with the verb string that corresponds to the command to be executed. If no verb is specified, the default verb is executed. /// /// /// A Variant that consists of a string with one or more arguments to the command specified by vVerb. The format of this string /// depends on the particular verb. /// /// /// A verb is a string used to specify a particular action associated with an item or collection of items. Typically, calling a /// verb launches a related application. For example, calling the open verb on a .txt file normally opens the file with a text /// editor, usually Microsoft Notepad. For further discussion of verbs, see Launching Applications. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] new void InvokeVerbEx([In, Optional, MarshalAs(UnmanagedType.Struct)] string vVerb, [In, Optional, MarshalAs(UnmanagedType.Struct)] string vArgs); /// Sets a wildcard filter to apply to the items returned. /// This parameter can be one of the flags listed in SHCONTF. /// A filter string that specifies what should be listed in the FolderItems collection. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] void Filter([In] SHCONTF grfFlags, [In, MarshalAs(UnmanagedType.BStr)] string bstrFileSpec); /// Gets the list of verbs common to all the folder items. /// Address of a pointer to the collection of verbs. See FolderItemVerbs. [DispId(0)] FolderItemVerbs Verbs { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; } } /// /// Represents a single verb available to an item. This object contains properties and methods that allow you to retrieve information /// about the verb. /// // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverb [PInvokeData("shldisp.h", MSDNShortId = "22f52e3f-875e-4dde-8875-3228639bc7f1")] [ComImport, DefaultMember("Name"), Guid("08EC3E00-50B0-11CF-960C-0080C7F4EE85")] public interface FolderItemVerb { /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverb-application [DispId(0x60020000)] object FolderItemVerb_Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverb-parent [DispId(0x60020001)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// /// Contains the verb's name. /// This property is read-only. /// // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverb-name [DispId(0)] string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; } /// Executes a verb on the FolderItem associated with the verb. // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverb-doit [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] void DoIt(); } /// /// Represents the collection of verbs for an item in a Shell folder. This object contains properties and methods that allow you to /// retrieve information about the collection. /// // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverbs [PInvokeData("shldisp.h", MSDNShortId = "31badb4b-b89e-4294-9dd7-bda716e163b2")] [ComImport, Guid("1F8352C0-50B0-11CF-960C-0080C7F4EE85")] public interface FolderItemVerbs : IEnumerable { /// /// Contains the number of items in the collection. /// This property is read-only. /// // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverbs-count [DispId(0x60020000)] int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverbs-application [DispId(0x60020001)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverbs-parent [DispId(0x60020002)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Retrieves the FolderItemVerb object for a specified item in the collection. /// /// Type: Variant /// The zero-based index of the item to retrieve. This value must be less than the value of the Count property. /// /// /// Type: IDispatch** /// Object that receives the FolderItemVerb object. /// // https://docs.microsoft.com/en-us/windows/win32/shell/folderitemverbs-item [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] FolderItemVerb Item([In, Optional, MarshalAs(UnmanagedType.Struct)] int index); /// Creates and returns a new FolderItemVerbs object that is a copy of this FolderItemVerbs object. [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(-4)] object _NewEnum(); } /// /// Exposed by the autocomplete object (CLSID_AutoComplete). This interface allows applications to initialize, enable, and disable /// the object. /// [PInvokeData("shldisp.h")] [ComImport, SuppressUnmanagedCodeSecurity, Guid("00bb2762-6a77-11d0-a535-00c04fd7d062"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(CAutoComplete))] public interface IAutoComplete { /// Initializes the autocomplete object. /// A handle to the window for the system edit control for which autocompletion will be enabled. /// /// A pointer to the IUnknown interface of the string list object that generates candidates for the completed string. The object /// must expose an IEnumString interface. /// /// /// A pointer to an optional, null-terminated Unicode string that gives the registry path, including the value name, where the /// format string is stored as a REG_SZ value. The autocomplete object first looks for the path under HKEY_CURRENT_USER. If it /// fails, it tries HKEY_LOCAL_MACHINE. For a discussion of the format string, see the definition of pwszQuickComplete. /// /// /// A pointer to an optional null-terminated Unicode string that specifies the format to be used if the user enters text and /// presses CTRL+ENTER. Set this parameter to NULL to disable quick completion. Otherwise, the autocomplete object treats /// pwszQuickComplete as a StringCchPrintf format string and the text in the edit box as its associated argument, to produce a /// new string. For example, set pwszQuickComplete to "http://www.%s.com/". When a user enters "MyURL" into the edit box and /// presses CTRL+ENTER, the text in the edit box is updated to "http://www.MyURL.com/". /// void Init(HWND hwndEdit, IEnumString punkAcl, [MarshalAs(UnmanagedType.LPWStr)] string pwszRegKeyPath, [MarshalAs(UnmanagedType.LPWStr)] string pwszQuickComplete); /// Enables or disables autocompletion. /// A value that is set to TRUE to enable autocompletion, or FALSE to disable it. void Enable([MarshalAs(UnmanagedType.Bool)] bool fEnable); } /// /// Extends IAutoComplete. This interface enables clients of the autocomplete object to retrieve and set a number of options that /// control how autocompletion operates. /// /// [PInvokeData("shldisp.h")] [ComImport, SuppressUnmanagedCodeSecurity, Guid("EAC04BC0-3791-11D2-BB95-0060977B464C"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(CAutoComplete))] public interface IAutoComplete2 : IAutoComplete { /// Initializes the autocomplete object. /// A handle to the window for the system edit control for which autocompletion will be enabled. /// /// A pointer to the IUnknown interface of the string list object that generates candidates for the completed string. The object /// must expose an IEnumString interface. /// /// /// A pointer to an optional, null-terminated Unicode string that gives the registry path, including the value name, where the /// format string is stored as a REG_SZ value. The autocomplete object first looks for the path under HKEY_CURRENT_USER. If it /// fails, it tries HKEY_LOCAL_MACHINE. For a discussion of the format string, see the definition of pwszQuickComplete. /// /// /// A pointer to an optional null-terminated Unicode string that specifies the format to be used if the user enters text and /// presses CTRL+ENTER. Set this parameter to NULL to disable quick completion. Otherwise, the autocomplete object treats /// pwszQuickComplete as a StringCchPrintf format string and the text in the edit box as its associated argument, to produce a /// new string. For example, set pwszQuickComplete to "http://www.%s.com/". When a user enters "MyURL" into the edit box and /// presses CTRL+ENTER, the text in the edit box is updated to "http://www.MyURL.com/". /// new void Init(HWND hwndEdit, IEnumString punkAcl, [MarshalAs(UnmanagedType.LPWStr)] string pwszRegKeyPath, [MarshalAs(UnmanagedType.LPWStr)] string pwszQuickComplete); /// Enables or disables autocompletion. /// A value that is set to TRUE to enable autocompletion, or FALSE to disable it. new void Enable([MarshalAs(UnmanagedType.Bool)] bool fEnable); /// Sets the current autocomplete options. /// One or more flags from the AUTOCOMPLETEOPTIONS enumeration that specify autocomplete options. void SetOptions(AUTOCOMPLETEOPTIONS dwFlag); /// Gets the current autocomplete options. /// /// One or more flags from the AUTOCOMPLETEOPTIONS enumeration that indicate the options that are currently set. /// void GetOptions(out AUTOCOMPLETEOPTIONS dwFlag); } /// Undocumented. [PInvokeData("shldisp.h")] [ComImport, Guid("2D91EEA1-9932-11D2-BE86-00A0C9A83DA1"), CoClass(typeof(FileSearchBand))] public interface IFileSearchBand { /// Undocumented. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] void SetFocus(); /// Undocumented. /// /// /// /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] void SetSearchParameters([In, MarshalAs(UnmanagedType.BStr)] ref string pbstrSearchID, [In] bool bNavToResults, [In, Optional, MarshalAs(UnmanagedType.Struct)] ref object pvarScope, [In, Optional, MarshalAs(UnmanagedType.Struct)] ref object pvarQueryFile); /// Undocumented. [DispId(3)] string SearchID { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; } /// Undocumented. [DispId(4)] object Scope { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; } /// Undocumented. [DispId(5)] object QueryFile { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; } } /// Undocumented. [PInvokeData("shldisp.h")] [ComImport, Guid("9BA05970-F6A8-11CF-A442-00A0C90A8F39"), CoClass(typeof(ShellFolderViewOC))] public interface IFolderViewOC { /// Undocumented. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] void SetFolderView([In, MarshalAs(UnmanagedType.IDispatch)] object pdisp); } /// /// Extends the WebWizardHost object by enabling server-side pages hosted in a wizard to verify that the user has been /// authenticated through a Microsoft account. /// // https://docs.microsoft.com/en-us/windows/win32/shell/newwdevents [PInvokeData("shldisp.h", MSDNShortId = "44f2431c-82a2-4142-bf20-55fdd0c88008")] [ComImport, Guid("0751C551-7568-41C9-8E5B-E22E38919236")] public interface INewWDEvents : IWebWizardHost { /// Navigates to the client-side page immediately preceding the page hosting the server-side HTML pages. /// /// When the wizard displays the first server-side page and the user clicks the Back button, the server invokes /// FinalBack when notified of that event by the client's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalback [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] new void FinalBack(); /// /// Navigates to the client-side wizard page that follows the page that hosts the server-side HTML pages, or finishes the wizard /// if there are no further client-side pages. /// /// /// When the wizard is displaying the last server-side HTML page and the user clicks the Next or Finish button, the /// server invokes FinalNext in that button's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalnext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] new void FinalNext(); /// Simulates a Cancel button click. /// The client is responsible for responding to this method with the expected behavior by closing the wizard. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-cancel [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] new void Cancel(); /// This property is not implemented. // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb774352(v=vs.85) [DispId(3)] new string Caption { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; } /// Sets or retrieves a property's current value. /// The property value. /// Name of the property. [DispId(4)] new object this[string bstrPropertyName] { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; } /// Updates the Back, Next, and Finish buttons in the client's wizard frame. /// Enables the Back button. /// Enables the Next button. /// Enables the Finish button. States that this is the last server-side page. /// /// Be sure to implement handler functions in each server-side page for OnBack() and OnNext(), corresponding to the wizard /// buttons Back and Next. The OnBack() and OnNext() functions respond to SetWizardButtons. At the /// appropriate time, the OnNext() function calls SetWizardButtons with vbLastPage= true, which can enable a /// Finish button. OnNext() also calls FinalNext when a user clicks the Finish button. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setwizardbuttons [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] new void SetWizardButtons([In] bool vfEnableBack, [In] bool vfEnableNext, [In] bool vfLastPage); /// /// Sets the title and subtitle that appear in the wizard header. In general, the client will display the header above the HTML /// and below the title bar. /// /// String containing the title. /// String containing the subtitle. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setheadertext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] new void SetHeaderText([In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderTitle, [In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderSubtitle); /// /// Enables server-side pages hosted in a wizard to verify that the user has been authenticated through a Microsoft account. /// /// A string containing the URL of a webpage that redirects to the Microsoft account log on UI. /// Set to true if authentication succeeds, false otherwise. /// /// This method may be called even if a user is already logged on to a Microsoft account. In that case, the method returns /// true without displaying the Microsoft account log on UI. /// // https://docs.microsoft.com/en-us/windows/win32/shell/inewwdevents-passportauthenticate [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] bool PassportAuthenticate([In, MarshalAs(UnmanagedType.BStr)] string bstrSignInUrl); } /// /// Represents an object in the Shell. Methods are provided to control the Shell and to execute commands within the Shell. There are /// also methods to obtain other Shell-related objects. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch [PInvokeData("shldisp.h", MSDNShortId = "9B429C03-7F80-45db-B8CD-58D19FAD2E61")] [ComImport, Guid("D8F015C0-C278-11CE-A49E-444553540000"), CoClass(typeof(Shell))] public interface IShellDispatch { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); } /// Extends the IShellDispatch object with a variety of new functionality. /// For a discussion of Windows services, see the Services documentation. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-object [PInvokeData("shldisp.h", MSDNShortId = "74687929-0777-479b-9853-2b0cf4b6adc9")] [ComImport, Guid("A4C6892C-3BA9-11D2-9DEA-00C04FB16162"), CoClass(typeof(Shell))] public interface IShellDispatch2 : IShellDispatch { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] new Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] new void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] new void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] new void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] new void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] new void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] new void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] new void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] new void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); /// Retrieves a group's restriction setting from the registry. /// /// Type: BSTR /// /// A String that contains the group name. This value is the name of a registry subkey under which to check for the restriction. /// /// /// /// Type: BSTR /// A String that contains the restriction whose value is to be retrieved. /// /// /// JScript /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// VB /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// /// /// This method is implemented and accessed through the Shell.IsRestricted method. /// IsRestricted first looks for a subkey name that matches sGroup under the following key. /// /// Restrictions are declared as values of the individual policy subkeys. If the restriction named in sRestriction is found in /// the subkey named in sGroup, IsRestricted returns the restriction's current value. If the restriction is not found /// under HKEY_LOCAL_MACHINE, the same subkey is checked under HKEY_CURRENT_USER. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isrestricted [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string sGroup, [In, MarshalAs(UnmanagedType.BStr)] string sRestriction); /// Performs a specified operation on a specified file. /// /// Type: BSTR /// /// A String that contains the name of the file on which ShellExecute will perform the action specified by vOperation. /// /// /// /// Type: Variant /// A string that contains parameter values for the operation. /// /// /// Type: Variant /// /// The fully qualified path of the directory that contains the file specified by sFile. If this parameter is not specified, the /// current working directory is used. /// /// /// /// Type: Variant /// /// The operation to be performed. This value is set to one of the verb strings that is supported by the file. For a discussion /// of verbs, see the Remarks section. If this parameter is not specified, the default operation is performed. /// /// /// /// Type: Variant /// /// A recommendation as to how the application window should be displayed initially. The application can ignore this /// recommendation. This parameter can be one of the following values. If this parameter is not specified, the application uses /// its default value. /// /// /// /// Value /// Meaning /// /// /// 0 /// Open the application with a hidden window. /// /// /// 1 /// /// Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original /// size and position. /// /// /// /// 2 /// Open the application with a minimized window. /// /// /// 3 /// Open the application with a maximized window. /// /// /// 4 /// Open the application with its window at its most recent size and position. The active window remains active. /// /// /// 5 /// Open the application with its window at its current size and position. /// /// /// 7 /// Open the application with a minimized window. The active window remains active. /// /// /// 10 /// Open the application with its window in the default state specified by the application. /// /// /// /// /// This method is implemented and accessed through the Shell.ShellExecute method. /// /// This method is equivalent to launching one of the commands associated with a file's shortcut menu. Each command is /// represented by a verb string. The set of supported verbs varies from file to file. The most commonly supported verb is /// "open", which is also usually the default verb. Other verbs might be supported by only certain types of files. For further /// discussion of Shell verbs, see Launching Applications or Extending Shortcut Menus. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-shellexecute [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string sFile, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArguments, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDirectory, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow); /// Displays the Find Printer dialog box. /// /// Type: BSTR /// A String that contains the printer name. /// /// /// Type: BSTR /// A String that contains the printer location. /// /// /// Type: BSTR /// A String that contains the printer model. /// /// /// This method is implemented and accessed through the Shell.FindPrinter method. /// /// If you assign strings to one or more of the optional parameters, they are displayed as default values in the associated edit /// control when the Find Printer dialog box is displayed. The user can either accept or override these values. If no /// value is assigned to a parameter, the associated edit box is empty and the user must enter a value. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-findprinter [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model); /// Retrieves system information. /// /// Type: BSTR /// A String that specifies the system information that is being requested. /// /// /// JScript /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// VB /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// /// /// This method is implemented and accessed through the Shell.GetSystemInformation method. /// /// This method can be used to request many system information values. The following table gives the sName value that is used to /// request the information and the associated type of the returned value. /// /// sName /// Return type /// Description /// DirectoryServiceAvailable /// Boolean /// Set to true if the directory service is available; otherwise, false. /// DoubleClickTime /// Integer /// The double-click time, in milliseconds. /// ProcessorLevel /// Integer /// /// Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively. /// /// ProcessorSpeed /// Integer /// The processor speed, in megahertz (MHz). /// ProcessorArchitecture /// Integer /// /// The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the /// SYSTEM_INFO structure. /// /// PhysicalMemoryInstalled /// Integer /// The amount of physical memory installed, in bytes. /// The following are valid only on Windows XP. /// IsOS_Professional /// Boolean /// Set to true if the operating system is Windows XP Professional Edition; otherwise, false. /// IsOS_Personal /// Boolean /// Set to true if the operating system is Windows XP Home Edition; otherwise, false. /// The following is valid only on Windows XP and later. /// IsOS_DomainMember /// Boolean /// Set to true if the computer is a member of a domain; otherwise, false. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-getsysteminformation [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)] object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string sName); /// Starts a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started automatically by the service control manager during system startup. Set to /// false to leave the service configuration unchanged. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStart method. /// /// The method returns false if the service has already been started. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestart [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Stops a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started by the service control manager when ServiceStart is called. To leave /// the service configuration unchanged, set vPersistent to false. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStop method. /// /// The method returns false if the service has already been stopped. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestop [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)] object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Returns a value that indicates whether a particular service is running. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// VB /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.IsServiceRunning method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isservicerunning [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)] object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Determines if the current user can start and stop the named service. /// /// Type: String /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// VB /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.CanStartStopService method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-canstartstopservice [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)] object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Displays a browser bar. /// /// Type: BSTR /// /// A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered /// as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer /// Bars, Tool Bands, and Desk Bands. /// /// /// /// Type: Variant /// Set to true to show the browser bar or false to hide it. /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ShowBrowserBar method. /// /// You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The /// standard Explorer Bars and their CLSID strings are as follows: /// /// /// /// Explorer Bar /// CLSID string /// /// /// Favorites /// {EFA24E61-B078-11d0-89E4-00C04FC9E26E} /// /// /// Folders /// {EFA24E64-B078-11d0-89E4-00C04FC9E26E} /// /// /// History /// {EFA24E62-B078-11d0-89E4-00C04FC9E26E} /// /// /// Search /// {30D02401-6A81-11d0-8274-00C04FD5AE38} /// /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-showbrowserbar [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)] object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string sCLSID, [In, MarshalAs(UnmanagedType.Struct)] object vShow); } /// /// Extends the IShellDispatch2 object. IShellDispatch3 supports one new method in addition to the properties and /// methods supported by IShellDispatch2. /// /// For a discussion of Windows services, see the Services documentation. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch3 [PInvokeData("shldisp.h", MSDNShortId = "89d0aa4d-844d-497d-82bb-bcc2bcf9c78b")] [ComImport, Guid("177160CA-BB5A-411C-841D-BD38FACDEAA0"), CoClass(typeof(Shell))] public interface IShellDispatch3 : IShellDispatch2 { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] new Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] new void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] new void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] new void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] new void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] new void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] new void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] new void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] new void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); /// Retrieves a group's restriction setting from the registry. /// /// Type: BSTR /// /// A String that contains the group name. This value is the name of a registry subkey under which to check for the restriction. /// /// /// /// Type: BSTR /// A String that contains the restriction whose value is to be retrieved. /// /// /// JScript /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// VB /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// /// /// This method is implemented and accessed through the Shell.IsRestricted method. /// IsRestricted first looks for a subkey name that matches sGroup under the following key. /// /// Restrictions are declared as values of the individual policy subkeys. If the restriction named in sRestriction is found in /// the subkey named in sGroup, IsRestricted returns the restriction's current value. If the restriction is not found /// under HKEY_LOCAL_MACHINE, the same subkey is checked under HKEY_CURRENT_USER. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isrestricted [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] new int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string sGroup, [In, MarshalAs(UnmanagedType.BStr)] string sRestriction); /// Performs a specified operation on a specified file. /// /// Type: BSTR /// /// A String that contains the name of the file on which ShellExecute will perform the action specified by vOperation. /// /// /// /// Type: Variant /// A string that contains parameter values for the operation. /// /// /// Type: Variant /// /// The fully qualified path of the directory that contains the file specified by sFile. If this parameter is not specified, the /// current working directory is used. /// /// /// /// Type: Variant /// /// The operation to be performed. This value is set to one of the verb strings that is supported by the file. For a discussion /// of verbs, see the Remarks section. If this parameter is not specified, the default operation is performed. /// /// /// /// Type: Variant /// /// A recommendation as to how the application window should be displayed initially. The application can ignore this /// recommendation. This parameter can be one of the following values. If this parameter is not specified, the application uses /// its default value. /// /// /// /// Value /// Meaning /// /// /// 0 /// Open the application with a hidden window. /// /// /// 1 /// /// Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original /// size and position. /// /// /// /// 2 /// Open the application with a minimized window. /// /// /// 3 /// Open the application with a maximized window. /// /// /// 4 /// Open the application with its window at its most recent size and position. The active window remains active. /// /// /// 5 /// Open the application with its window at its current size and position. /// /// /// 7 /// Open the application with a minimized window. The active window remains active. /// /// /// 10 /// Open the application with its window in the default state specified by the application. /// /// /// /// /// This method is implemented and accessed through the Shell.ShellExecute method. /// /// This method is equivalent to launching one of the commands associated with a file's shortcut menu. Each command is /// represented by a verb string. The set of supported verbs varies from file to file. The most commonly supported verb is /// "open", which is also usually the default verb. Other verbs might be supported by only certain types of files. For further /// discussion of Shell verbs, see Launching Applications or Extending Shortcut Menus. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-shellexecute [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] new void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string sFile, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArguments, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDirectory, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow); /// Displays the Find Printer dialog box. /// /// Type: BSTR /// A String that contains the printer name. /// /// /// Type: BSTR /// A String that contains the printer location. /// /// /// Type: BSTR /// A String that contains the printer model. /// /// /// This method is implemented and accessed through the Shell.FindPrinter method. /// /// If you assign strings to one or more of the optional parameters, they are displayed as default values in the associated edit /// control when the Find Printer dialog box is displayed. The user can either accept or override these values. If no /// value is assigned to a parameter, the associated edit box is empty and the user must enter a value. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-findprinter [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model); /// Retrieves system information. /// /// Type: BSTR /// A String that specifies the system information that is being requested. /// /// /// JScript /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// VB /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// /// /// This method is implemented and accessed through the Shell.GetSystemInformation method. /// /// This method can be used to request many system information values. The following table gives the sName value that is used to /// request the information and the associated type of the returned value. /// /// sName /// Return type /// Description /// DirectoryServiceAvailable /// Boolean /// Set to true if the directory service is available; otherwise, false. /// DoubleClickTime /// Integer /// The double-click time, in milliseconds. /// ProcessorLevel /// Integer /// /// Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively. /// /// ProcessorSpeed /// Integer /// The processor speed, in megahertz (MHz). /// ProcessorArchitecture /// Integer /// /// The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the /// SYSTEM_INFO structure. /// /// PhysicalMemoryInstalled /// Integer /// The amount of physical memory installed, in bytes. /// The following are valid only on Windows XP. /// IsOS_Professional /// Boolean /// Set to true if the operating system is Windows XP Professional Edition; otherwise, false. /// IsOS_Personal /// Boolean /// Set to true if the operating system is Windows XP Home Edition; otherwise, false. /// The following is valid only on Windows XP and later. /// IsOS_DomainMember /// Boolean /// Set to true if the computer is a member of a domain; otherwise, false. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-getsysteminformation [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)] new object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string sName); /// Starts a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started automatically by the service control manager during system startup. Set to /// false to leave the service configuration unchanged. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStart method. /// /// The method returns false if the service has already been started. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestart [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] new object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Stops a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started by the service control manager when ServiceStart is called. To leave /// the service configuration unchanged, set vPersistent to false. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStop method. /// /// The method returns false if the service has already been stopped. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestop [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)] new object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Returns a value that indicates whether a particular service is running. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// VB /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.IsServiceRunning method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isservicerunning [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)] new object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Determines if the current user can start and stop the named service. /// /// Type: String /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// VB /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.CanStartStopService method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-canstartstopservice [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)] new object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Displays a browser bar. /// /// Type: BSTR /// /// A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered /// as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer /// Bars, Tool Bands, and Desk Bands. /// /// /// /// Type: Variant /// Set to true to show the browser bar or false to hide it. /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ShowBrowserBar method. /// /// You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The /// standard Explorer Bars and their CLSID strings are as follows: /// /// /// /// Explorer Bar /// CLSID string /// /// /// Favorites /// {EFA24E61-B078-11d0-89E4-00C04FC9E26E} /// /// /// Folders /// {EFA24E64-B078-11d0-89E4-00C04FC9E26E} /// /// /// History /// {EFA24E62-B078-11d0-89E4-00C04FC9E26E} /// /// /// Search /// {30D02401-6A81-11d0-8274-00C04FD5AE38} /// /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-showbrowserbar [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)] new object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string sCLSID, [In, MarshalAs(UnmanagedType.Struct)] object vShow); /// Adds a file to the most recently used (MRU) list. /// /// Type: Variant /// A String that contains the path of the file to add to the list of recently used documents. /// Windows Vista: Set this parameter to null to clear the recent documents folder. /// /// A String that contains the name of the category in which to place the file. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-addtorecent [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] void AddToRecent([In, MarshalAs(UnmanagedType.Struct)] object varFile, [In, Optional, MarshalAs(UnmanagedType.BStr)] string bstrCategory); } /// /// Extends the IShellDispatch3 object. In addition to the properties and methods supported by IShellDispatch3, /// IShellDispatch4 supports four additional methods. /// /// For a discussion of Windows services, see the Services documentation. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4 [PInvokeData("shldisp.h", MSDNShortId = "4fe37e38-ee71-41f0-b620-35fdc18f9dbb")] [ComImport, Guid("EFD84B2D-4BCF-4298-BE25-EB542A59FBDA"), CoClass(typeof(Shell))] public interface IShellDispatch4 : IShellDispatch3 { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] new Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] new void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] new void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] new void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] new void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] new void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] new void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] new void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] new void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); /// Retrieves a group's restriction setting from the registry. /// /// Type: BSTR /// /// A String that contains the group name. This value is the name of a registry subkey under which to check for the restriction. /// /// /// /// Type: BSTR /// A String that contains the restriction whose value is to be retrieved. /// /// /// JScript /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// VB /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// /// /// This method is implemented and accessed through the Shell.IsRestricted method. /// IsRestricted first looks for a subkey name that matches sGroup under the following key. /// /// Restrictions are declared as values of the individual policy subkeys. If the restriction named in sRestriction is found in /// the subkey named in sGroup, IsRestricted returns the restriction's current value. If the restriction is not found /// under HKEY_LOCAL_MACHINE, the same subkey is checked under HKEY_CURRENT_USER. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isrestricted [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] new int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string sGroup, [In, MarshalAs(UnmanagedType.BStr)] string sRestriction); /// Performs a specified operation on a specified file. /// /// Type: BSTR /// /// A String that contains the name of the file on which ShellExecute will perform the action specified by vOperation. /// /// /// /// Type: Variant /// A string that contains parameter values for the operation. /// /// /// Type: Variant /// /// The fully qualified path of the directory that contains the file specified by sFile. If this parameter is not specified, the /// current working directory is used. /// /// /// /// Type: Variant /// /// The operation to be performed. This value is set to one of the verb strings that is supported by the file. For a discussion /// of verbs, see the Remarks section. If this parameter is not specified, the default operation is performed. /// /// /// /// Type: Variant /// /// A recommendation as to how the application window should be displayed initially. The application can ignore this /// recommendation. This parameter can be one of the following values. If this parameter is not specified, the application uses /// its default value. /// /// /// /// Value /// Meaning /// /// /// 0 /// Open the application with a hidden window. /// /// /// 1 /// /// Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original /// size and position. /// /// /// /// 2 /// Open the application with a minimized window. /// /// /// 3 /// Open the application with a maximized window. /// /// /// 4 /// Open the application with its window at its most recent size and position. The active window remains active. /// /// /// 5 /// Open the application with its window at its current size and position. /// /// /// 7 /// Open the application with a minimized window. The active window remains active. /// /// /// 10 /// Open the application with its window in the default state specified by the application. /// /// /// /// /// This method is implemented and accessed through the Shell.ShellExecute method. /// /// This method is equivalent to launching one of the commands associated with a file's shortcut menu. Each command is /// represented by a verb string. The set of supported verbs varies from file to file. The most commonly supported verb is /// "open", which is also usually the default verb. Other verbs might be supported by only certain types of files. For further /// discussion of Shell verbs, see Launching Applications or Extending Shortcut Menus. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-shellexecute [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] new void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string sFile, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArguments, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDirectory, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow); /// Displays the Find Printer dialog box. /// /// Type: BSTR /// A String that contains the printer name. /// /// /// Type: BSTR /// A String that contains the printer location. /// /// /// Type: BSTR /// A String that contains the printer model. /// /// /// This method is implemented and accessed through the Shell.FindPrinter method. /// /// If you assign strings to one or more of the optional parameters, they are displayed as default values in the associated edit /// control when the Find Printer dialog box is displayed. The user can either accept or override these values. If no /// value is assigned to a parameter, the associated edit box is empty and the user must enter a value. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-findprinter [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model); /// Retrieves system information. /// /// Type: BSTR /// A String that specifies the system information that is being requested. /// /// /// JScript /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// VB /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// /// /// This method is implemented and accessed through the Shell.GetSystemInformation method. /// /// This method can be used to request many system information values. The following table gives the sName value that is used to /// request the information and the associated type of the returned value. /// /// sName /// Return type /// Description /// DirectoryServiceAvailable /// Boolean /// Set to true if the directory service is available; otherwise, false. /// DoubleClickTime /// Integer /// The double-click time, in milliseconds. /// ProcessorLevel /// Integer /// /// Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively. /// /// ProcessorSpeed /// Integer /// The processor speed, in megahertz (MHz). /// ProcessorArchitecture /// Integer /// /// The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the /// SYSTEM_INFO structure. /// /// PhysicalMemoryInstalled /// Integer /// The amount of physical memory installed, in bytes. /// The following are valid only on Windows XP. /// IsOS_Professional /// Boolean /// Set to true if the operating system is Windows XP Professional Edition; otherwise, false. /// IsOS_Personal /// Boolean /// Set to true if the operating system is Windows XP Home Edition; otherwise, false. /// The following is valid only on Windows XP and later. /// IsOS_DomainMember /// Boolean /// Set to true if the computer is a member of a domain; otherwise, false. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-getsysteminformation [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)] new object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string sName); /// Starts a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started automatically by the service control manager during system startup. Set to /// false to leave the service configuration unchanged. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStart method. /// /// The method returns false if the service has already been started. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestart [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] new object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Stops a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started by the service control manager when ServiceStart is called. To leave /// the service configuration unchanged, set vPersistent to false. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStop method. /// /// The method returns false if the service has already been stopped. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestop [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)] new object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Returns a value that indicates whether a particular service is running. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// VB /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.IsServiceRunning method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isservicerunning [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)] new object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Determines if the current user can start and stop the named service. /// /// Type: String /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// VB /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.CanStartStopService method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-canstartstopservice [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)] new object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Displays a browser bar. /// /// Type: BSTR /// /// A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered /// as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer /// Bars, Tool Bands, and Desk Bands. /// /// /// /// Type: Variant /// Set to true to show the browser bar or false to hide it. /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ShowBrowserBar method. /// /// You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The /// standard Explorer Bars and their CLSID strings are as follows: /// /// /// /// Explorer Bar /// CLSID string /// /// /// Favorites /// {EFA24E61-B078-11d0-89E4-00C04FC9E26E} /// /// /// Folders /// {EFA24E64-B078-11d0-89E4-00C04FC9E26E} /// /// /// History /// {EFA24E62-B078-11d0-89E4-00C04FC9E26E} /// /// /// Search /// {30D02401-6A81-11d0-8274-00C04FD5AE38} /// /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-showbrowserbar [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)] new object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string sCLSID, [In, MarshalAs(UnmanagedType.Struct)] object vShow); /// Adds a file to the most recently used (MRU) list. /// /// Type: Variant /// A String that contains the path of the file to add to the list of recently used documents. /// Windows Vista: Set this parameter to null to clear the recent documents folder. /// /// A String that contains the name of the category in which to place the file. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-addtorecent [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] new void AddToRecent([In, MarshalAs(UnmanagedType.Struct)] object varFile, [In, Optional, MarshalAs(UnmanagedType.BStr)] string bstrCategory); /// Displays the Windows Security dialog box. /// /// This method displays the dialog box shown after pressing CTRL+ALT+DELETE or using the security option on the Start menu. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-windowssecurity [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050000)] void WindowsSecurity(); /// Displays or hides the desktop. /// /// This method has the same effect as the Show Desktop button on the taskbar. It either hides all open windows to show /// the desktop or it hides the desktop by showing all open windows. The ToggleDesktop method does not display a user /// interface, it just invokes the toggle action. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-toggledesktop [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050001)] void ToggleDesktop(); /// Gets the value for a specified Windows Internet Explorer policy. /// A String that specifies the name of the policy. /// /// JScript /// Type: Variant* /// The value associated with the specified policy name. /// VB /// Type: Variant* /// The value associated with the specified policy name. /// /// /// Network Administrators can control and manage the computing environment of their users by setting policies. /// /// The specified value name must be within the HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ /// CurrentVersion\ Policies\ Explorer subkey. If the value name does not exist then the method returns null. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-explorerpolicy [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050002)] object ExplorerPolicy([In, MarshalAs(UnmanagedType.BStr)] string bstrPolicyName); /// Retrieves a global Shell setting. /// /// A value that specifies the current Shell setting to retrieve. Only one setting can be retrieved in each call. The following /// values are recognized by this method. /// /// Set to true if the setting exists; otherwise, false. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-getsetting [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050003)] bool GetSetting([In] SSF lSetting); } /// /// Extends the IShellDispatch4 object. In addition to the properties and methods supported by IShellDispatch4, /// IShellDispatch5 adds a method that displays open windows in a 3D stack. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch5 [PInvokeData("shldisp.h", MSDNShortId = "9170340a-0f11-4ec9-877d-fb7fef9888b2")] [ComImport, Guid("866738B9-6CF2-4DE8-8767-F794EBE74F4E"), CoClass(typeof(Shell))] public interface IShellDispatch5 : IShellDispatch4 { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] new Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] new void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] new void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] new void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] new void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] new void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] new void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] new void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] new void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); /// Retrieves a group's restriction setting from the registry. /// /// Type: BSTR /// /// A String that contains the group name. This value is the name of a registry subkey under which to check for the restriction. /// /// /// /// Type: BSTR /// A String that contains the restriction whose value is to be retrieved. /// /// /// JScript /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// VB /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// /// /// This method is implemented and accessed through the Shell.IsRestricted method. /// IsRestricted first looks for a subkey name that matches sGroup under the following key. /// /// Restrictions are declared as values of the individual policy subkeys. If the restriction named in sRestriction is found in /// the subkey named in sGroup, IsRestricted returns the restriction's current value. If the restriction is not found /// under HKEY_LOCAL_MACHINE, the same subkey is checked under HKEY_CURRENT_USER. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isrestricted [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] new int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string sGroup, [In, MarshalAs(UnmanagedType.BStr)] string sRestriction); /// Performs a specified operation on a specified file. /// /// Type: BSTR /// /// A String that contains the name of the file on which ShellExecute will perform the action specified by vOperation. /// /// /// /// Type: Variant /// A string that contains parameter values for the operation. /// /// /// Type: Variant /// /// The fully qualified path of the directory that contains the file specified by sFile. If this parameter is not specified, the /// current working directory is used. /// /// /// /// Type: Variant /// /// The operation to be performed. This value is set to one of the verb strings that is supported by the file. For a discussion /// of verbs, see the Remarks section. If this parameter is not specified, the default operation is performed. /// /// /// /// Type: Variant /// /// A recommendation as to how the application window should be displayed initially. The application can ignore this /// recommendation. This parameter can be one of the following values. If this parameter is not specified, the application uses /// its default value. /// /// /// /// Value /// Meaning /// /// /// 0 /// Open the application with a hidden window. /// /// /// 1 /// /// Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original /// size and position. /// /// /// /// 2 /// Open the application with a minimized window. /// /// /// 3 /// Open the application with a maximized window. /// /// /// 4 /// Open the application with its window at its most recent size and position. The active window remains active. /// /// /// 5 /// Open the application with its window at its current size and position. /// /// /// 7 /// Open the application with a minimized window. The active window remains active. /// /// /// 10 /// Open the application with its window in the default state specified by the application. /// /// /// /// /// This method is implemented and accessed through the Shell.ShellExecute method. /// /// This method is equivalent to launching one of the commands associated with a file's shortcut menu. Each command is /// represented by a verb string. The set of supported verbs varies from file to file. The most commonly supported verb is /// "open", which is also usually the default verb. Other verbs might be supported by only certain types of files. For further /// discussion of Shell verbs, see Launching Applications or Extending Shortcut Menus. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-shellexecute [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] new void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string sFile, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArguments, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDirectory, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow); /// Displays the Find Printer dialog box. /// /// Type: BSTR /// A String that contains the printer name. /// /// /// Type: BSTR /// A String that contains the printer location. /// /// /// Type: BSTR /// A String that contains the printer model. /// /// /// This method is implemented and accessed through the Shell.FindPrinter method. /// /// If you assign strings to one or more of the optional parameters, they are displayed as default values in the associated edit /// control when the Find Printer dialog box is displayed. The user can either accept or override these values. If no /// value is assigned to a parameter, the associated edit box is empty and the user must enter a value. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-findprinter [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model); /// Retrieves system information. /// /// Type: BSTR /// A String that specifies the system information that is being requested. /// /// /// JScript /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// VB /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// /// /// This method is implemented and accessed through the Shell.GetSystemInformation method. /// /// This method can be used to request many system information values. The following table gives the sName value that is used to /// request the information and the associated type of the returned value. /// /// sName /// Return type /// Description /// DirectoryServiceAvailable /// Boolean /// Set to true if the directory service is available; otherwise, false. /// DoubleClickTime /// Integer /// The double-click time, in milliseconds. /// ProcessorLevel /// Integer /// /// Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively. /// /// ProcessorSpeed /// Integer /// The processor speed, in megahertz (MHz). /// ProcessorArchitecture /// Integer /// /// The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the /// SYSTEM_INFO structure. /// /// PhysicalMemoryInstalled /// Integer /// The amount of physical memory installed, in bytes. /// The following are valid only on Windows XP. /// IsOS_Professional /// Boolean /// Set to true if the operating system is Windows XP Professional Edition; otherwise, false. /// IsOS_Personal /// Boolean /// Set to true if the operating system is Windows XP Home Edition; otherwise, false. /// The following is valid only on Windows XP and later. /// IsOS_DomainMember /// Boolean /// Set to true if the computer is a member of a domain; otherwise, false. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-getsysteminformation [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)] new object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string sName); /// Starts a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started automatically by the service control manager during system startup. Set to /// false to leave the service configuration unchanged. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStart method. /// /// The method returns false if the service has already been started. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestart [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] new object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Stops a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started by the service control manager when ServiceStart is called. To leave /// the service configuration unchanged, set vPersistent to false. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStop method. /// /// The method returns false if the service has already been stopped. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestop [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)] new object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Returns a value that indicates whether a particular service is running. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// VB /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.IsServiceRunning method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isservicerunning [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)] new object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Determines if the current user can start and stop the named service. /// /// Type: String /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// VB /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.CanStartStopService method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-canstartstopservice [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)] new object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Displays a browser bar. /// /// Type: BSTR /// /// A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered /// as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer /// Bars, Tool Bands, and Desk Bands. /// /// /// /// Type: Variant /// Set to true to show the browser bar or false to hide it. /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ShowBrowserBar method. /// /// You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The /// standard Explorer Bars and their CLSID strings are as follows: /// /// /// /// Explorer Bar /// CLSID string /// /// /// Favorites /// {EFA24E61-B078-11d0-89E4-00C04FC9E26E} /// /// /// Folders /// {EFA24E64-B078-11d0-89E4-00C04FC9E26E} /// /// /// History /// {EFA24E62-B078-11d0-89E4-00C04FC9E26E} /// /// /// Search /// {30D02401-6A81-11d0-8274-00C04FD5AE38} /// /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-showbrowserbar [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)] new object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string sCLSID, [In, MarshalAs(UnmanagedType.Struct)] object vShow); /// Adds a file to the most recently used (MRU) list. /// /// Type: Variant /// A String that contains the path of the file to add to the list of recently used documents. /// Windows Vista: Set this parameter to null to clear the recent documents folder. /// /// A String that contains the name of the category in which to place the file. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-addtorecent [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] new void AddToRecent([In, MarshalAs(UnmanagedType.Struct)] object varFile, [In, Optional, MarshalAs(UnmanagedType.BStr)] string bstrCategory); /// Displays the Windows Security dialog box. /// /// This method displays the dialog box shown after pressing CTRL+ALT+DELETE or using the security option on the Start menu. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-windowssecurity [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050000)] new void WindowsSecurity(); /// Displays or hides the desktop. /// /// This method has the same effect as the Show Desktop button on the taskbar. It either hides all open windows to show /// the desktop or it hides the desktop by showing all open windows. The ToggleDesktop method does not display a user /// interface, it just invokes the toggle action. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-toggledesktop [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050001)] new void ToggleDesktop(); /// Gets the value for a specified Windows Internet Explorer policy. /// A String that specifies the name of the policy. /// /// JScript /// Type: Variant* /// The value associated with the specified policy name. /// VB /// Type: Variant* /// The value associated with the specified policy name. /// /// /// Network Administrators can control and manage the computing environment of their users by setting policies. /// /// The specified value name must be within the HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ /// CurrentVersion\ Policies\ Explorer subkey. If the value name does not exist then the method returns null. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-explorerpolicy [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050002)] new object ExplorerPolicy([In, MarshalAs(UnmanagedType.BStr)] string bstrPolicyName); /// Retrieves a global Shell setting. /// /// A value that specifies the current Shell setting to retrieve. Only one setting can be retrieved in each call. The following /// values are recognized by this method. /// /// Set to true if the setting exists; otherwise, false. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-getsetting [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050003)] new bool GetSetting([In] SSF lSetting); /// Displays your open windows in a 3D stack that you can flip through. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-windowswitcher [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60060000)] void WindowSwitcher(); } /// /// Extends the IShellDispatch5 object. In addition to the properties and methods supported by IShellDispatch5, /// IShellDispatch6 adds a method that displays the Apps Search pane. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch6 [PInvokeData("shldisp.h", MSDNShortId = "540A5CFD-1520-4B61-B461-E893EFA27115")] [ComImport, Guid("286E6F1B-7113-4355-9562-96B7E9D64C54"), CoClass(typeof(Shell))] public interface IShellDispatch6 : IShellDispatch5 { /// /// Contains an object that represents an application. /// This property is read-only. /// /// /// This property is implemented and accessed through the Shell.EjectPC property. /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// /// Retrieves an object that represents the parent of the current object. /// This property is read-only. /// /// This property is implemented and accessed through the Shell.Parent property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// Creates and returns a Folder object for the specified folder. /// /// Type: Variant /// /// The folder for which to create the Folder object. This can be a string that specifies the path of the folder or one of /// the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// VB /// Type: Folder** /// /// Object reference to the Folder object for the specified folder. If the folder is not successfully created, this value /// returns null. /// /// /// This method is implemented and accessed through the Shell.NameSpace method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-namespace [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] new Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Creates a dialog box that enables the user to select a folder and then returns the selected folder's Folder object. /// /// /// Type: Integer /// The handle to the parent window of the dialog box. This value can be zero. /// /// /// Type: BSTR /// A String value that represents the title displayed inside the Browse dialog box. /// /// /// Type: Integer /// /// An Integer value that contains the options for the method. This can be zero or a combination of the values listed /// under the ulFlags member of the BROWSEINFO structure. /// /// /// /// Type: Variant /// /// The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not /// specified, the root folder used in the dialog box is the desktop. This value can be a string that specifies the path of the /// folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in /// ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric /// values must be used in their place. /// /// /// /// JScript /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// VB /// Type: FOLDER** /// An object reference to the selected folder's Folder object. /// /// This method is implemented and accessed through the Shell.BrowseForFolder method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-browseforfolder [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder); /// /// Creates and returns a ShellWindows object. This object represents a collection of all of the open windows that belong /// to the Shell. /// /// /// JScript /// Type: IDispatch** /// An object reference to the ShellWindows object. /// VB /// Type: IDispatch** /// An object reference to the ShellWindows object. /// /// This method is implemented and accessed through the Shell.Windows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-windows [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] new object Windows(); /// Opens the specified folder. /// /// Type: Variant /// /// A string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the /// constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In /// those cases, the numeric values must be used in their place. /// /// /// If vDir is set to one of the ShellSpecialFolderConstants and the special folder does not exist, this function will /// create the folder. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Open method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-open [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// Opens a specified folder in a Windows Explorer window. /// /// Type: Variant /// /// The folder to be displayed. This can be a string that specifies the path of the folder or one of the /// ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are /// available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place. /// /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Explore method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-explore [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir); /// /// Minimizes all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Minimize All Windows on older systems or clicking the Show Desktop icon on the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.MinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-minimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] new void MinimizeAll(); /// /// Restores all desktop windows to the state they were in before the last MinimizeAll command. This method has the same /// effect as right-clicking the taskbar and selecting Undo Minimize All Windows (on older systems) or a second clicking /// of the Show Desktop icon in the taskbar. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.UndoMinimizeAll method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-undominimizeall [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] new void UndoMinimizeALL(); /// Displays the Run dialog to the user. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FileRun method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-filerun [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)] new void FileRun(); /// /// Cascades all of the windows on the desktop. This method has the same effect as right-clicking the taskbar and selecting /// Cascade windows. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.CascadeWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-cascadewindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] new void CascadeWindows(); /// /// Tiles all of the windows on the desktop vertically. This method has the same effect as right-clicking the taskbar and /// selecting Show windows side by side. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileVertically method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilevertically [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)] new void TileVertically(); /// /// Tiles all of the windows on the desktop horizontally. This method has the same effect as right-clicking the taskbar and /// selecting Show windows stacked. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TileHorizontally method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-tilehorizontally [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void TileHorizontally(); /// /// Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ShutdownWindows method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-shutdownwindows [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new void ShutdownWindows(); /// This method is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-suspend [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void Suspend(); /// /// Ejects the computer from its docking station. This is the same as clicking the Start menu and selecting Eject /// PC, if your computer supports this command. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.EjectPC method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-ejectpc [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void EjectPC(); /// /// Displays the Date and Time dialog box. This method has the same effect as right-clicking the clock in the taskbar /// status area and selecting Adjust date/time. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.SetTime method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-settime [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)] new void SetTime(); /// /// Displays the Taskbar and Start Menu Properties dialog box. This method has the same effect as right-clicking the /// taskbar and selecting Properties. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.TrayProperties method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-trayproperties [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)] new void TrayProperties(); /// /// Displays the Windows Help and Support window. This method has the same effect as clicking the Start menu and selecting /// Help and Support. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.Help method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-help [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)] new void Help(); /// /// Displays the Find: All Files dialog box. This is the same as clicking the Start menu and then selecting Search. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindFiles method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findfiles [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)] new void FindFiles(); /// /// Displays the Search Results: Computers dialog box. The dialog box shows the result of the search for a specified computer. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.FindComputer method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-findcomputer [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)] new void FindComputer(); /// Refreshes the contents of the Start menu. Used only with systems preceding Windows XP. /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// /// This method is implemented and accessed through the Shell.TrayProperties method. /// /// The functionality that RefreshMenu provides is handled automatically under Windows XP or later. Do not call this /// method on Windows XP or later. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-refreshmenu [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)] new void RefreshMenu(); /// /// Runs the specified Control Panel application. If the application is already open, it will activate the running instance. /// /// /// Type: BSTR /// The Control Panel application's file name. /// /// /// JScript /// This method does not return a value. /// VB /// This method does not return a value. /// /// This method is implemented and accessed through the Shell.ControlPanelItem method. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch-controlpanelitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)] new void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir); /// Retrieves a group's restriction setting from the registry. /// /// Type: BSTR /// /// A String that contains the group name. This value is the name of a registry subkey under which to check for the restriction. /// /// /// /// Type: BSTR /// A String that contains the restriction whose value is to be retrieved. /// /// /// JScript /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// VB /// Type: Integer* /// The value of the restriction. If the specified restriction is not found, the return value is 0. /// /// /// This method is implemented and accessed through the Shell.IsRestricted method. /// IsRestricted first looks for a subkey name that matches sGroup under the following key. /// /// Restrictions are declared as values of the individual policy subkeys. If the restriction named in sRestriction is found in /// the subkey named in sGroup, IsRestricted returns the restriction's current value. If the restriction is not found /// under HKEY_LOCAL_MACHINE, the same subkey is checked under HKEY_CURRENT_USER. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isrestricted [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] new int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string sGroup, [In, MarshalAs(UnmanagedType.BStr)] string sRestriction); /// Performs a specified operation on a specified file. /// /// Type: BSTR /// /// A String that contains the name of the file on which ShellExecute will perform the action specified by vOperation. /// /// /// /// Type: Variant /// A string that contains parameter values for the operation. /// /// /// Type: Variant /// /// The fully qualified path of the directory that contains the file specified by sFile. If this parameter is not specified, the /// current working directory is used. /// /// /// /// Type: Variant /// /// The operation to be performed. This value is set to one of the verb strings that is supported by the file. For a discussion /// of verbs, see the Remarks section. If this parameter is not specified, the default operation is performed. /// /// /// /// Type: Variant /// /// A recommendation as to how the application window should be displayed initially. The application can ignore this /// recommendation. This parameter can be one of the following values. If this parameter is not specified, the application uses /// its default value. /// /// /// /// Value /// Meaning /// /// /// 0 /// Open the application with a hidden window. /// /// /// 1 /// /// Open the application with a normal window. If the window is minimized or maximized, the system restores it to its original /// size and position. /// /// /// /// 2 /// Open the application with a minimized window. /// /// /// 3 /// Open the application with a maximized window. /// /// /// 4 /// Open the application with its window at its most recent size and position. The active window remains active. /// /// /// 5 /// Open the application with its window at its current size and position. /// /// /// 7 /// Open the application with a minimized window. The active window remains active. /// /// /// 10 /// Open the application with its window in the default state specified by the application. /// /// /// /// /// This method is implemented and accessed through the Shell.ShellExecute method. /// /// This method is equivalent to launching one of the commands associated with a file's shortcut menu. Each command is /// represented by a verb string. The set of supported verbs varies from file to file. The most commonly supported verb is /// "open", which is also usually the default verb. Other verbs might be supported by only certain types of files. For further /// discussion of Shell verbs, see Launching Applications or Extending Shortcut Menus. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-shellexecute [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)] new void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string sFile, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArguments, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDirectory, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow); /// Displays the Find Printer dialog box. /// /// Type: BSTR /// A String that contains the printer name. /// /// /// Type: BSTR /// A String that contains the printer location. /// /// /// Type: BSTR /// A String that contains the printer model. /// /// /// This method is implemented and accessed through the Shell.FindPrinter method. /// /// If you assign strings to one or more of the optional parameters, they are displayed as default values in the associated edit /// control when the Find Printer dialog box is displayed. The user can either accept or override these values. If no /// value is assigned to a parameter, the associated edit box is empty and the user must enter a value. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-findprinter [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model); /// Retrieves system information. /// /// Type: BSTR /// A String that specifies the system information that is being requested. /// /// /// JScript /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// VB /// Type: Variant /// /// Returns the value of the requested system information. The return type depends on which system information is requested. See /// the Remarks section for details. /// /// /// /// This method is implemented and accessed through the Shell.GetSystemInformation method. /// /// This method can be used to request many system information values. The following table gives the sName value that is used to /// request the information and the associated type of the returned value. /// /// sName /// Return type /// Description /// DirectoryServiceAvailable /// Boolean /// Set to true if the directory service is available; otherwise, false. /// DoubleClickTime /// Integer /// The double-click time, in milliseconds. /// ProcessorLevel /// Integer /// /// Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively. /// /// ProcessorSpeed /// Integer /// The processor speed, in megahertz (MHz). /// ProcessorArchitecture /// Integer /// /// The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the /// SYSTEM_INFO structure. /// /// PhysicalMemoryInstalled /// Integer /// The amount of physical memory installed, in bytes. /// The following are valid only on Windows XP. /// IsOS_Professional /// Boolean /// Set to true if the operating system is Windows XP Professional Edition; otherwise, false. /// IsOS_Personal /// Boolean /// Set to true if the operating system is Windows XP Home Edition; otherwise, false. /// The following is valid only on Windows XP and later. /// IsOS_DomainMember /// Boolean /// Set to true if the computer is a member of a domain; otherwise, false. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-getsysteminformation [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)] new object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string sName); /// Starts a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started automatically by the service control manager during system startup. Set to /// false to leave the service configuration unchanged. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStart method. /// /// The method returns false if the service has already been started. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestart [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)] new object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Stops a named service. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// Type: Variant /// /// Set to true to have the service started by the service control manager when ServiceStart is called. To leave /// the service configuration unchanged, set vPersistent to false. /// /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ServiceStop method. /// /// The method returns false if the service has already been stopped. Before calling this method, you can call /// Shell.IsServiceRunning to ascertain the status of the service. /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-servicestop [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)] new object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string sServiceName, [In, MarshalAs(UnmanagedType.Struct)] object vPersistent); /// Returns a value that indicates whether a particular service is running. /// /// Type: BSTR /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// VB /// Type: Variant* /// Returns true if the service specified by sServiceName is running; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.IsServiceRunning method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-isservicerunning [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)] new object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Determines if the current user can start and stop the named service. /// /// Type: String /// A String that contains the name of the service. /// /// /// JScript /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// VB /// Type: Variant* /// Returns true if the user can start and stop the service; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.CanStartStopService method. /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-canstartstopservice [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)] new object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string sServiceName); /// Displays a browser bar. /// /// Type: BSTR /// /// A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered /// as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer /// Bars, Tool Bands, and Desk Bands. /// /// /// /// Type: Variant /// Set to true to show the browser bar or false to hide it. /// /// /// JScript /// Type: Variant* /// Returns true if successful; otherwise, false. /// VB /// Type: Variant* /// Returns true if successful; otherwise, false. /// /// /// This method is implemented and accessed through the Shell.ShowBrowserBar method. /// /// You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The /// standard Explorer Bars and their CLSID strings are as follows: /// /// /// /// Explorer Bar /// CLSID string /// /// /// Favorites /// {EFA24E61-B078-11d0-89E4-00C04FC9E26E} /// /// /// Folders /// {EFA24E64-B078-11d0-89E4-00C04FC9E26E} /// /// /// History /// {EFA24E62-B078-11d0-89E4-00C04FC9E26E} /// /// /// Search /// {30D02401-6A81-11d0-8274-00C04FD5AE38} /// /// /// This method is not currently available in Microsoft Visual Basic. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch2-showbrowserbar [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)] new object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string sCLSID, [In, MarshalAs(UnmanagedType.Struct)] object vShow); /// Adds a file to the most recently used (MRU) list. /// /// Type: Variant /// A String that contains the path of the file to add to the list of recently used documents. /// Windows Vista: Set this parameter to null to clear the recent documents folder. /// /// A String that contains the name of the category in which to place the file. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-addtorecent [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] new void AddToRecent([In, MarshalAs(UnmanagedType.Struct)] object varFile, [In, Optional, MarshalAs(UnmanagedType.BStr)] string bstrCategory); /// Displays the Windows Security dialog box. /// /// This method displays the dialog box shown after pressing CTRL+ALT+DELETE or using the security option on the Start menu. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-windowssecurity [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050000)] new void WindowsSecurity(); /// Displays or hides the desktop. /// /// This method has the same effect as the Show Desktop button on the taskbar. It either hides all open windows to show /// the desktop or it hides the desktop by showing all open windows. The ToggleDesktop method does not display a user /// interface, it just invokes the toggle action. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-toggledesktop [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050001)] new void ToggleDesktop(); /// Gets the value for a specified Windows Internet Explorer policy. /// A String that specifies the name of the policy. /// /// JScript /// Type: Variant* /// The value associated with the specified policy name. /// VB /// Type: Variant* /// The value associated with the specified policy name. /// /// /// Network Administrators can control and manage the computing environment of their users by setting policies. /// /// The specified value name must be within the HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ /// CurrentVersion\ Policies\ Explorer subkey. If the value name does not exist then the method returns null. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-explorerpolicy [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050002)] new object ExplorerPolicy([In, MarshalAs(UnmanagedType.BStr)] string bstrPolicyName); /// Retrieves a global Shell setting. /// /// A value that specifies the current Shell setting to retrieve. Only one setting can be retrieved in each call. The following /// values are recognized by this method. /// /// Set to true if the setting exists; otherwise, false. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch4-getsetting [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050003)] new bool GetSetting([In] SSF lSetting); /// Displays your open windows in a 3D stack that you can flip through. // https://docs.microsoft.com/en-us/windows/win32/shell/shell-windowswitcher [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60060000)] new void WindowSwitcher(); /// Displays the Apps Search pane, which normally appears when you begin to type a search term from the Start screen. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch6-searchcommand [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60070000)] void SearchCommand(); } /// Exposes methods that modify the view and select items in the current folder. // https://docs.microsoft.com/en-us/windows/desktop/api/shldisp/nn-shldisp-ishellfolderviewdual [PInvokeData("shldisp.h", MSDNShortId = "48135f9d-ee80-4dec-87dc-83f407c25777")] [ComImport, Guid("E7A1AF80-4D96-11CF-960C-0080C7F4EE85"), CoClass(typeof(ShellFolderView))] public interface IShellFolderViewDual { /// /// Contains the object's Application object. /// This property is read-only. /// /// /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-application [DispId(0x60020000)] object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-parent [DispId(0x60020001)] object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// /// Gets a Folder object that represents the view. /// This property is read-only. /// /// Folder can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-folder [DispId(0x60020002)] Folder Folder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Gets a FolderItems object that represents all of the selected items in the view. /// /// Type: FolderItems** /// An object reference to the FolderItems object. /// /// /// SelectedItems can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selecteditems [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] FolderItems SelectedItems(); /// /// Gets a FolderItem object that represents the item that has the input focus. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-focuseditem [DispId(0x60020004)] FolderItem FocusedItem { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; } /// Sets the selection state of an item in the view. /// /// Type: Variant* /// The FolderItem object for which the selection state will be set. /// /// /// Type: Integer /// A set of flags that indicate the new selection state. This can be one or more of the following values. /// /// (0) Deselect the item. /// (1) Select the item. /// (3) Put the item in edit mode. /// (4) Deselect all but the specified item. /// (8) Ensure the item is displayed in the view. /// (16) Give the item the focus. /// /// /// This method does not return a value. /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selectitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] void SelectItem([In, MarshalAs(UnmanagedType.Struct)] ref object vItem, [In] int dwFlags); /// Creates a shortcut menu for the specified item and returns the selected command string. /// /// Type: Variant /// The FolderItem object for which the shortcut menu will be created. /// /// /// Type: Variant /// The horizontal position of the menu, in screen coordinates. /// /// /// Type: Variant /// The vertical position of the menu, in screen coordinates. /// /// /// Type: BSTR* /// The String that receives the command string. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-popupitemmenu [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] string PopupItemMenu([In, MarshalAs(UnmanagedType.Interface)] FolderItem vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vx, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vy); /// /// [This property is not supported in Windows XP or later.] /// Contains the scripting object for the view. /// This property is read-only. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-script [DispId(0x60020007)] object Script { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] get; } /// /// Gets a set of flags that indicate the current options of the view. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-viewoptions [DispId(0x60020008)] ShellFolderViewOptions ViewOptions { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; } } /// Exposes methods that modify the view and select items in the current folder. /// This interface also provides the methods of the IShellFolderViewDual interface, from which it inherits. // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nn-shldisp-ishellfolderviewdual2 [PInvokeData("shldisp.h", MSDNShortId = "f53b779e-a015-4b17-b04d-e0739cba8168")] [ComImport, Guid("31C147B6-0ADE-4A3C-B514-DDF932EF6D17"), CoClass(typeof(ShellFolderView))] public interface IShellFolderViewDual2 : IShellFolderViewDual { /// /// Contains the object's Application object. /// This property is read-only. /// /// /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// /// Gets a Folder object that represents the view. /// This property is read-only. /// /// Folder can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-folder [DispId(0x60020002)] new Folder Folder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Gets a FolderItems object that represents all of the selected items in the view. /// /// Type: FolderItems** /// An object reference to the FolderItems object. /// /// /// SelectedItems can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selecteditems [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new FolderItems SelectedItems(); /// /// Gets a FolderItem object that represents the item that has the input focus. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-focuseditem [DispId(0x60020004)] new FolderItem FocusedItem { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; } /// Sets the selection state of an item in the view. /// /// Type: Variant* /// The FolderItem object for which the selection state will be set. /// /// /// Type: Integer /// A set of flags that indicate the new selection state. This can be one or more of the following values. /// /// (0) Deselect the item. /// (1) Select the item. /// (3) Put the item in edit mode. /// (4) Deselect all but the specified item. /// (8) Ensure the item is displayed in the view. /// (16) Give the item the focus. /// /// /// This method does not return a value. /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selectitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void SelectItem([In, MarshalAs(UnmanagedType.Struct)] ref object vItem, [In] int dwFlags); /// Creates a shortcut menu for the specified item and returns the selected command string. /// /// Type: Variant /// The FolderItem object for which the shortcut menu will be created. /// /// /// Type: Variant /// The horizontal position of the menu, in screen coordinates. /// /// /// Type: Variant /// The vertical position of the menu, in screen coordinates. /// /// /// Type: BSTR* /// The String that receives the command string. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-popupitemmenu [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new string PopupItemMenu([In, MarshalAs(UnmanagedType.Interface)] FolderItem vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vx, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vy); /// /// [This property is not supported in Windows XP or later.] /// Contains the scripting object for the view. /// This property is read-only. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-script [DispId(0x60020007)] new object Script { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] get; } /// /// Gets a set of flags that indicate the current options of the view. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-viewoptions [DispId(0x60020008)] new ShellFolderViewOptions ViewOptions { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; } /// Gets the current view mode of the current folder. /// /// Type: uint* /// An unsigned integer that represents the current view mode. For a list of possible values see FOLDERVIEWMODE. /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual2-get_currentviewmode [DispId(0x60030000)] FOLDERVIEWMODE CurrentViewMode { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] set; } /// Selects an item relative to the current item. /// /// Type: int /// The offset of the item to be selected in relation to the current item. /// /// /// The current item is defined as the item in the view with the SVSI_SELECTIONMARK state. If there is no item with /// SVSI_SELECTIONMARK, the method returns S_FALSE and does nothing. /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual2-selectitemrelative [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] void SelectItemRelative([In] int iRelative); } /// Exposes methods that modify the current folder view. /// /// This interface also provides the methods of the IShellFolderViewDual and IShellFolderViewDual2 interfaces, from which it inherits. /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nn-shldisp-ishellfolderviewdual3 [PInvokeData("shldisp.h", MSDNShortId = "1aa70db8-4225-49de-8b8f-ec86b1aafa22")] [ComImport, Guid("29EC8E6C-46D3-411F-BAAA-611A6C9CAC66"), CoClass(typeof(ShellFolderView))] public interface IShellFolderViewDual3 : IShellFolderViewDual2 { /// /// Contains the object's Application object. /// This property is read-only. /// /// /// /// The Application property returns the automation object supported by the application that contains the WebBrowser /// control, if that object is accessible. Otherwise, this property returns the WebBrowser control's automation object. /// /// /// Use this property with the Set and CreateObject commands or with the GetObject command to create and /// manipulate an instance of the Windows Internet Explorer application. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-application [DispId(0x60020000)] new object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; } /// This property is not implemented. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-parent [DispId(0x60020001)] new object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; } /// /// Gets a Folder object that represents the view. /// This property is read-only. /// /// Folder can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-folder [DispId(0x60020002)] new Folder Folder { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; } /// Gets a FolderItems object that represents all of the selected items in the view. /// /// Type: FolderItems** /// An object reference to the FolderItems object. /// /// /// SelectedItems can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selecteditems [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)] new FolderItems SelectedItems(); /// /// Gets a FolderItem object that represents the item that has the input focus. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-focuseditem [DispId(0x60020004)] new FolderItem FocusedItem { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; } /// Sets the selection state of an item in the view. /// /// Type: Variant* /// The FolderItem object for which the selection state will be set. /// /// /// Type: Integer /// A set of flags that indicate the new selection state. This can be one or more of the following values. /// /// (0) Deselect the item. /// (1) Select the item. /// (3) Put the item in edit mode. /// (4) Deselect all but the specified item. /// (8) Ensure the item is displayed in the view. /// (16) Give the item the focus. /// /// /// This method does not return a value. /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-selectitem [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)] new void SelectItem([In, MarshalAs(UnmanagedType.Struct)] ref object vItem, [In] int dwFlags); /// Creates a shortcut menu for the specified item and returns the selected command string. /// /// Type: Variant /// The FolderItem object for which the shortcut menu will be created. /// /// /// Type: Variant /// The horizontal position of the menu, in screen coordinates. /// /// /// Type: Variant /// The vertical position of the menu, in screen coordinates. /// /// /// Type: BSTR* /// The String that receives the command string. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-popupitemmenu [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] new string PopupItemMenu([In, MarshalAs(UnmanagedType.Interface)] FolderItem vItem, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vx, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vy); /// /// [This property is not supported in Windows XP or later.] /// Contains the scripting object for the view. /// This property is read-only. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-script [DispId(0x60020007)] new object Script { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)] get; } /// /// Gets a set of flags that indicate the current options of the view. /// This property is read-only. /// /// /// FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview-viewoptions [DispId(0x60020008)] new ShellFolderViewOptions ViewOptions { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; } /// Gets the current view mode of the current folder. /// /// Type: uint* /// An unsigned integer that represents the current view mode. For a list of possible values see FOLDERVIEWMODE. /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual2-get_currentviewmode [DispId(0x60030000)] new FOLDERVIEWMODE CurrentViewMode { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] set; } /// Selects an item relative to the current item. /// /// Type: int /// The offset of the item to be selected in relation to the current item. /// /// /// The current item is defined as the item in the view with the SVSI_SELECTIONMARK state. If there is no item with /// SVSI_SELECTIONMARK, the method returns S_FALSE and does nothing. /// // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual2-selectitemrelative [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)] new void SelectItemRelative([In] int iRelative); /// Gets or sets the column name used for grouping the folder view. // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual3-get_groupby [DispId(0x60040000)] string GroupBy { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)] set; } /// Gets or sets the settings for the current folder. [DispId(0x60040002)] FOLDERFLAGS FolderFlags { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040002)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040002)] set; } /// Gets or sets the names of the columns used to sort the current folder. [DispId(0x60040004)] string SortColumns { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040004)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040004)] set; } /// Gets or sets the icon size setting for the current folder. [DispId(0x60040006)] int IconSize { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040006)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040006)] set; } /// Sets the filter on the contents of the current view. /// The string that names the filter view for the current folder. // https://docs.microsoft.com/en-us/windows/win32/api/shldisp/nf-shldisp-ishellfolderviewdual3-filterview [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040008)] void FilterView([In, MarshalAs(UnmanagedType.BStr)] string bstrFilterText); } /// /// Manages Shell links. This object makes much of the functionality of the IShellLink interface available to scripting applications. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-object [PInvokeData("shldisp.h", MSDNShortId = "d3c0ccf8-0f83-42f7-9d6f-1fb293da6364")] [ComImport, Guid("88A05C00-F000-11CE-8350-444553540000"), CoClass(typeof(ShellLinkObject))] public interface IShellLinkDual { /// /// Gets or sets the path to the link object. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-path [DispId(0x60020000)] string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] set; } /// /// Gets or sets the description of the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-description [DispId(0x60020002)] string Description { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] set; } /// /// Gets or sets the working directory specified in the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-workingdirectory [DispId(0x60020004)] string WorkingDirectory { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] set; } /// /// Contains a link's arguments. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-arguments [DispId(0x60020006)] string Arguments { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] set; } /// /// Gets or sets the keyboard shortcut for the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-hotkey [DispId(0x60020008)] int Hotkey { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] set; } /// /// Gets or sets the initial display state (sized, minimized, or maximized) of the link's command. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-showcommand [DispId(0x6002000a)] int ShowCommand { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] set; } /// Looks for the target of a Shell link, even if the target has been moved or renamed. /// /// Type: Integer /// Flags that specify the action to be taken. This can be a combination of the following values: /// /// /// (1)Do not display a dialog box if the link cannot be resolved. When this flag is set, the high-order word of fFlags specifies /// a time-out duration, in milliseconds. The method returns if the link cannot be resolved within the time-out duration. If the /// high-order word is set to zero, the time-out duration defaults to 3000 milliseconds (3 seconds). /// /// (4)If the link has changed, update its path and list of identifiers. /// (8)Do not update the link information. /// (16)Do not execute the search heuristics. /// (32)Do not use distributed link tracking. /// /// (64)Disable distributed link tracking. By default, distributed link tracking tracks removable media across multiple devices /// based on the volume name. It also uses the UNC path to track remote file systems whose drive letter has changed. Setting this /// flag disables both types of tracking. /// /// (128)Call the Windows Installer. /// /// /// /// This method is essentially identical in functionality to Resolve. For further discussion of link resolution, see the /// Remarks section of that page. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-resolve [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] void Resolve([In] int fFlags); /// Gets the location of the icon assigned to the link. /// When this method returns, it holds the fully qualified path of the file that contains the icon. /// Returns the icon's index in the file specified by sPath. // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-geticonlocation [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] int GetIconLocation([MarshalAs(UnmanagedType.BStr)] out string sPath); /// Sets the location of the icon assigned to the link. /// The fully qualified path of the file that contains the icon. /// The index of the icon in the file specified by sPath. // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-seticonlocation [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] void SetIconLocation([In, MarshalAs(UnmanagedType.BStr)] string sPath, [In] int iIndex); /// Saves all changes to the link. /// /// Type: Variant /// /// A string value that contains the fully qualified path of the file where the new link information is to be saved. If no file /// is specified, the current file is used. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-save [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] void Save([In, Optional, MarshalAs(UnmanagedType.Struct)] object sFile); } /// Extends the ShellLinkObject object and supports one additional property. // https://docs.microsoft.com/en-us/windows/win32/shell/ishelllinkdual2-object [PInvokeData("shldisp.h", MSDNShortId = "8a63552c-6bce-4583-8df8-a7f7731b35eb")] [ComImport, Guid("317EE249-F12E-11D2-B1E4-00C04F8EEB3E"), CoClass(typeof(ShellLinkObject))] public interface IShellLinkDual2 : IShellLinkDual { /// /// Gets or sets the path to the link object. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-path [DispId(0x60020000)] new string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] set; } /// /// Gets or sets the description of the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-description [DispId(0x60020002)] new string Description { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)] set; } /// /// Gets or sets the working directory specified in the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-workingdirectory [DispId(0x60020004)] new string WorkingDirectory { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)] set; } /// /// Contains a link's arguments. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-arguments [DispId(0x60020006)] new string Arguments { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)] set; } /// /// Gets or sets the keyboard shortcut for the link. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-hotkey [DispId(0x60020008)] new int Hotkey { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)] set; } /// /// Gets or sets the initial display state (sized, minimized, or maximized) of the link's command. /// This property is read/write. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-showcommand [DispId(0x6002000a)] new int ShowCommand { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)] set; } /// Looks for the target of a Shell link, even if the target has been moved or renamed. /// /// Type: Integer /// Flags that specify the action to be taken. This can be a combination of the following values: /// /// /// (1)Do not display a dialog box if the link cannot be resolved. When this flag is set, the high-order word of fFlags specifies /// a time-out duration, in milliseconds. The method returns if the link cannot be resolved within the time-out duration. If the /// high-order word is set to zero, the time-out duration defaults to 3000 milliseconds (3 seconds). /// /// (4)If the link has changed, update its path and list of identifiers. /// (8)Do not update the link information. /// (16)Do not execute the search heuristics. /// (32)Do not use distributed link tracking. /// /// (64)Disable distributed link tracking. By default, distributed link tracking tracks removable media across multiple devices /// based on the volume name. It also uses the UNC path to track remote file systems whose drive letter has changed. Setting this /// flag disables both types of tracking. /// /// (128)Call the Windows Installer. /// /// /// /// This method is essentially identical in functionality to Resolve. For further discussion of link resolution, see the /// Remarks section of that page. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-resolve [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)] new void Resolve([In] int fFlags); /// Gets the location of the icon assigned to the link. /// When this method returns, it holds the fully qualified path of the file that contains the icon. /// Returns the icon's index in the file specified by sPath. // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-geticonlocation [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)] new int GetIconLocation([MarshalAs(UnmanagedType.BStr)] out string sPath); /// Sets the location of the icon assigned to the link. /// The fully qualified path of the file that contains the icon. /// The index of the icon in the file specified by sPath. // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-seticonlocation [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)] new void SetIconLocation([In, MarshalAs(UnmanagedType.BStr)] string sPath, [In] int iIndex); /// Saves all changes to the link. /// /// Type: Variant /// /// A string value that contains the fully qualified path of the file where the new link information is to be saved. If no file /// is specified, the current file is used. /// /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-save [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)] new void Save([In, Optional, MarshalAs(UnmanagedType.Struct)] object sFile); /// Contains the link object's target. /// An object expression that evaluates to the target's FolderItem object. [DispId(0x60030000)] FolderItem Target { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)] get; } } /// Exposes methods that enable HTML pages which are hosted in a wizard extension to communicate with the wizard. // https://docs.microsoft.com/en-us/windows/win32/shell/webwizardhost [PInvokeData("shldisp.h", MSDNShortId = "7b3690dc-2007-43a0-80a3-4a68e3c8464d")] [ComImport, Guid("18BCC359-4990-4BFB-B951-3C83702BE5F9")] public interface IWebWizardHost { /// Navigates to the client-side page immediately preceding the page hosting the server-side HTML pages. /// /// When the wizard displays the first server-side page and the user clicks the Back button, the server invokes /// FinalBack when notified of that event by the client's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalback [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] void FinalBack(); /// /// Navigates to the client-side wizard page that follows the page that hosts the server-side HTML pages, or finishes the wizard /// if there are no further client-side pages. /// /// /// When the wizard is displaying the last server-side HTML page and the user clicks the Next or Finish button, the /// server invokes FinalNext in that button's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalnext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] void FinalNext(); /// Simulates a Cancel button click. /// The client is responsible for responding to this method with the expected behavior by closing the wizard. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-cancel [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] void Cancel(); /// This property is not implemented. // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb774352(v=vs.85) [DispId(3)] string Caption { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; } /// Sets or retrieves a property's current value. /// The property value. /// Name of the property. [DispId(4)] object this[string bstrPropertyName] { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; } /// Updates the Back, Next, and Finish buttons in the client's wizard frame. /// Enables the Back button. /// Enables the Next button. /// Enables the Finish button. States that this is the last server-side page. /// /// Be sure to implement handler functions in each server-side page for OnBack() and OnNext(), corresponding to the wizard /// buttons Back and Next. The OnBack() and OnNext() functions respond to SetWizardButtons. At the /// appropriate time, the OnNext() function calls SetWizardButtons with vbLastPage= true, which can enable a /// Finish button. OnNext() also calls FinalNext when a user clicks the Finish button. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setwizardbuttons [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] void SetWizardButtons([In] bool vfEnableBack, [In] bool vfEnableNext, [In] bool vfLastPage); /// /// Sets the title and subtitle that appear in the wizard header. In general, the client will display the header above the HTML /// and below the title bar. /// /// String containing the title. /// String containing the subtitle. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setheadertext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] void SetHeaderText([In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderTitle, [In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderSubtitle); } /// Undocumented. /// [PInvokeData("shldisp.h")] [ComImport, Guid("F9C013DC-3C23-4041-8E39-CFB402F7EA59")] public interface IWebWizardHost2 : IWebWizardHost { /// Navigates to the client-side page immediately preceding the page hosting the server-side HTML pages. /// /// When the wizard displays the first server-side page and the user clicks the Back button, the server invokes /// FinalBack when notified of that event by the client's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalback [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] new void FinalBack(); /// /// Navigates to the client-side wizard page that follows the page that hosts the server-side HTML pages, or finishes the wizard /// if there are no further client-side pages. /// /// /// When the wizard is displaying the last server-side HTML page and the user clicks the Next or Finish button, the /// server invokes FinalNext in that button's event handler. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-finalnext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] new void FinalNext(); /// Simulates a Cancel button click. /// The client is responsible for responding to this method with the expected behavior by closing the wizard. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-cancel [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] new void Cancel(); /// This property is not implemented. // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb774352(v=vs.85) [DispId(3)] new string Caption { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; } /// Sets or retrieves a property's current value. /// The property value. /// Name of the property. [DispId(4)] new object this[string bstrPropertyName] { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; } /// Updates the Back, Next, and Finish buttons in the client's wizard frame. /// Enables the Back button. /// Enables the Next button. /// Enables the Finish button. States that this is the last server-side page. /// /// Be sure to implement handler functions in each server-side page for OnBack() and OnNext(), corresponding to the wizard /// buttons Back and Next. The OnBack() and OnNext() functions respond to SetWizardButtons. At the /// appropriate time, the OnNext() function calls SetWizardButtons with vbLastPage= true, which can enable a /// Finish button. OnNext() also calls FinalNext when a user clicks the Finish button. /// // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setwizardbuttons [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] new void SetWizardButtons([In] bool vfEnableBack, [In] bool vfEnableNext, [In] bool vfLastPage); /// /// Sets the title and subtitle that appear in the wizard header. In general, the client will display the header above the HTML /// and below the title bar. /// /// String containing the title. /// String containing the subtitle. // https://docs.microsoft.com/en-us/windows/win32/shell/iwebwizardhost-setheadertext [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] new void SetHeaderText([In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderTitle, [In, MarshalAs(UnmanagedType.BStr)] string bstrHeaderSubtitle); /// Undocumented. [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] string SignString([In, MarshalAs(UnmanagedType.BStr)] string Value); } /// An autocomplete object (CLSID_AutoComplete). [ComImport, SuppressUnmanagedCodeSecurity, Guid("00BB2763-6A77-11D0-A535-00C04FD7D062"), ClassInterface(ClassInterfaceType.None)] public class CAutoComplete { } /// Undocumented. [ComImport, Guid("C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1"), ClassInterface(ClassInterfaceType.None)] public class FileSearchBand { } /// /// Represents the objects in the Shell. Methods are provided to control the Shell and to execute commands within the Shell. There /// are also methods to obtain other Shell-related objects. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shell [PInvokeData("shldisp.h", MSDNShortId = "75fc151e-5b9e-476b-b4e5-b848917357a8")] [ComImport, ClassInterface(ClassInterfaceType.None), Guid("13709620-C279-11CE-A49E-444553540000")] public class Shell { } /// /// Represents an object in the Shell. Methods are provided to control the Shell and to execute commands within the Shell. There are /// also methods to obtain other Shell-related objects. /// // https://docs.microsoft.com/en-us/windows/win32/shell/ishelldispatch [PInvokeData("shldisp.h", MSDNShortId = "9B429C03-7F80-45db-B8CD-58D19FAD2E61")] [ComImport, ClassInterface(ClassInterfaceType.None), Guid("0A89A860-D7B1-11CE-8350-444553540000")] public class ShellDispatchInproc { } /// /// Extends the FolderItem object. In addition to the properties and methods supported by FolderItem, /// ShellFolderItem has two additional methods. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderitem-object [PInvokeData("shldisp.h", MSDNShortId = "0e2f4c91-f9f9-4daa-a801-9c7fea8af738")] [ComImport, Guid("2FE352EA-FD1F-11D2-B1F4-00C04F8EEB3E"), ClassInterface(ClassInterfaceType.None)] public class ShellFolderItem { } /// /// Represents the objects in a view and provides properties and methods used to obtain information about the contents of the view. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview [PInvokeData("shldisp.h", MSDNShortId = "3b866266-fee0-42f7-a1e0-9adb6cc2e23f")] [ComImport, Guid("62112AA1-EBE4-11CF-A5FB-0020AFE7292D"), ClassInterface(ClassInterfaceType.None)] public class ShellFolderView { } /// /// Represents the objects in a view and provides properties and methods used to obtain information about the contents of the view. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shellfolderview [PInvokeData("shldisp.h", MSDNShortId = "3b866266-fee0-42f7-a1e0-9adb6cc2e23f")] [ComImport, Guid("9BA05971-F6A8-11CF-A442-00A0C90A8F39"), ClassInterface(ClassInterfaceType.None)] public class ShellFolderViewOC { } /// /// Manages Shell links. This object makes much of the functionality of the IShellLink interface available to scripting applications. /// // https://docs.microsoft.com/en-us/windows/win32/shell/shelllinkobject-object [PInvokeData("", MSDNShortId = "d3c0ccf8-0f83-42f7-9d6f-1fb293da6364")] [ComImport, Guid("11219420-1768-11D1-95BE-00609797EA4F"), ClassInterface(ClassInterfaceType.None)] public class ShellLinkObject { } } }