shlobj_core.h header

This header is used by multiple technologies. For more information, see:

shlobj_core.h contains the following programming interfaces:

Interfaces

 
IACList

Exposes a method that improves the efficiency of autocompletion when the candidate strings are organized in a hierarchy.
IACList2

Extends the IACList interface to enable clients of an autocomplete object to retrieve and set option flags.
IActiveDesktop

Allows a client program to manage the desktop items and wallpaper on a local computer.
IDockingWindowSite

Exposes methods that manage the border space for one or more IDockingWindow objects. This interface is implemented by the browser and is similar to the IOleInPlaceUIWindow interface.
IExtractIconA

Exposes methods that allow a client to retrieve the icon that is associated with one of the objects in a folder. (ANSI)
IExtractIconW

Exposes methods that allow a client to retrieve the icon that is associated with one of the objects in a folder. (Unicode)
INamedPropertyBag

Exposes methods that provide an object with a specified property bag in which the object can save its properties.
IObjMgr

Exposes methods that allow a client to append or remove an object from a collection of objects managed by a server object.
IProgressDialog

Exposes methods that provide options for an application to display a progress dialog box.
IQueryInfo

Exposes methods that the Shell uses to retrieve flags and info tip information for an item that resides in an IShellFolder implementation. Info tips are usually displayed inside a tooltip control.
ISearchContext

Exposes methods that channel customization information to the search hooks.
IShellChangeNotify

Exposes a method that notifies a Shell namespace extension when the ID of an item has changed.
IShellDetails

Exposed by Shell folders to provide detailed information about the items in a folder.
IShellFolderView

Exposes methods that manipulate Shell folder views.
IShellFolderViewCB

Exposes a method that allows communication between Windows Explorer and a folder view implemented using the system folder view object (the IShellView object returned through SHCreateShellFolderView) so that the folder view can be notified of events and modify its view accordingly.
IShellIconOverlay

Exposes methods that are used by a namespace extension to specify icon overlays for the objects it contains.
IShellIconOverlayManager

IShellIconOverlayManager may be altered or unavailable.
IURLSearchHook

Exposes a method that is used by the browser to translate the address of an unknown URL protocol.
IURLSearchHook2

Exposes a method that is used by the browser to translate the address of an unknown URL protocol by using a search context object.

Functions

 
AssocGetDetailsOfPropKey

Retrieves the value for a given property key using the file association information provided by the Namespace Extensions.
CDefFolderMenu_Create2

Creates a context menu for a selected group of file folder objects.
CIDLData_CreateFromIDArray

CIDLData_CreateFromIDArray may be altered or unavailable.
DAD_AutoScroll

Scrolls the window while an image is being dragged.
DAD_DragEnterEx

Locks updates to the specified window during a drag operation and displays the drag image at the specified position within the window. (DAD_DragEnterEx)
DAD_DragEnterEx2

Locks updates to the specified window during a drag-and-drop operation and displays the drag image at the specified position within the window.
DAD_DragLeave

Unlocks the window locked by the DAD_DragEnterEx function.
DAD_DragMove

Moves the image that is being dragged during a drag-and-drop operation.
DAD_SetDragImage

Sets the drag image.
DAD_ShowDragImage

Shows or hides the image being dragged. (DAD_ShowDragImage)
DriveType

The DriveType function determines the drive type based on the drive number. (DriveType)
GetFileNameFromBrowse

The GetFileNameFromBrowse function creates an Open dialog box so that the user can specify the drive, directory, and name of a file to open. (GetFileNameFromBrowse)
IDListContainerIsConsistent

Verifies that the container structure of an IDList is valid.
ILAppendID

Appends or prepends an SHITEMID structure to an ITEMIDLIST structure.
ILClone

Clones an ITEMIDLIST structure.
ILCloneChild

Clones a child ITEMIDLIST structure.
ILCloneFirst

Clones the first SHITEMID structure in an ITEMIDLIST structure.
ILCloneFull

Clones a full, or absolute, ITEMIDLIST structure.
ILCombine

Combines two ITEMIDLIST structures.
ILCreateFromPath

The ILCreateFromPath function returns the ITEMIDLIST structure associated with a specified file path.
ILCreateFromPathA

Returns the ITEMIDLIST structure associated with a specified file path. (ILCreateFromPathA)
ILCreateFromPathW

The ILCreateFromPathW (Unicode) function returns the ITEMIDLIST structure associated with a specified file path.
ILFindChild

Determines whether a specified ITEMIDLIST structure is the child of another ITEMIDLIST structure.
ILFindLastID

Returns a pointer to the last SHITEMID structure in an ITEMIDLIST structure.
ILFree

Frees an ITEMIDLIST structure allocated by the Shell.
ILGetNext

Retrieves the next SHITEMID structure in an ITEMIDLIST structure. (ILGetNext)
ILGetSize

Returns the size, in bytes, of an ITEMIDLIST structure.
ILIsAligned

Verifies whether a constant ITEMIDLIST is aligned on a pointer boundary, which is a DWORD on 32-bit architectures and a QWORD on 64-bit architectures.
ILIsChild

Verifies whether a pointer to an item identifier list (PIDL) is a child PIDL, which is a PIDL with exactly one SHITEMID.
ILIsEmpty

Verifies whether an ITEMIDLIST structure is empty.
ILIsEqual

Tests whether two ITEMIDLIST structures are equal in a binary comparison.
ILIsParent

Tests whether an ITEMIDLIST structure is the parent of another ITEMIDLIST structure.
ILLoadFromStream

Deprecated. Loads an ITEMIDLIST structure from a stream.
ILLoadFromStreamEx

This function may be altered or unavailable.
ILLoadFromStreamEx

The ILLoadFromStreamEx function loads an ITEMIDLIST from an IStream. (ILLoadFromStreamEx r1)
ILLoadFromStreamEx

The ILLoadFromStreamEx function loads a child pointer to an item identifier list (PIDL) from an IStream. (ILLoadFromStreamEx r2)
ILNext

Retrieves the next SHITEMID structure in an ITEMIDLIST structure. (ILNext)
ILRemoveLastID

Removes the last SHITEMID structure from an ITEMIDLIST structure.
ILSaveToStream

Saves an ITEMIDLIST structure to a stream.
ILSkip

Skips a given number of bytes in a constant, unaligned, relative ITEMIDLIST structure.
IsNetDrive

Tests whether a drive is a network drive.
IsUserAnAdmin

IsUserAnAdmin may be altered or unavailable.
OpenRegStream

OpenRegStream may be altered or unavailable. Instead, use SHOpenRegStream2 or SHOpenRegStream.
PathCleanupSpec

PathCleanupSpec may be altered or unavailable.
PathGetShortPath

PathGetShortPath may be altered or unavailable.
PathIsExe

PathIsExe may be altered or unavailable.
PathMakeUniqueName

Creates a unique path name from a template.
PathResolve

PathResolve may be altered or unavailable.
PathYetAnotherMakeUniqueName

Creates a unique filename based on an existing filename.
PickIconDlg

PickIconDlg may be altered or unavailable.
PifMgr_CloseProperties

Closes application properties that were opened with PifMgr_OpenProperties.
PifMgr_GetProperties

Returns a specified block of data from a .pif file.
PifMgr_OpenProperties

Opens the .pif file associated with a Microsoft MS-DOS application, and returns a handle to the application's properties.
PifMgr_SetProperties

Assigns values to a block of data from a .pif file.
ReadCabinetState

ReadCabinetState may be altered or unavailable.
RealDriveType

RealDriveType may be altered or unavailable.
RestartDialog

Displays a dialog box that prompts the user to restart Windows. When the user clicks the button, the function calls ExitWindowsEx to attempt to restart Windows.
RestartDialogEx

Displays a dialog box that asks the user to restart Windows. When the user clicks the button, the function calls ExitWindowsEx to attempt to restart Windows.
SHAddFromPropSheetExtArray

Adds pages to a property sheet extension array created by SHCreatePropSheetExtArray.
SHAddToRecentDocs

Notifies the system that an item has been accessed, for the purposes of tracking those items used most recently and most frequently. This function can also be used to clear all usage data.
SHAlloc

Allocates memory from the Shell's heap.
SHBindToFolderIDListParent

Given a Shell namespace item specified in the form of a folder, and an item identifier list relative to that folder, this function binds to the parent of the namespace item and optionally returns a pointer to the final component of the item identifier list.
SHBindToFolderIDListParentEx

Extends the SHBindToFolderIDListParent function by allowing the caller to specify a bind context.
SHBindToObject

Retrieves and binds to a specified object by using the Shell namespace IShellFolder::BindToObject method.
SHBindToParent

Takes a pointer to a fully qualified item identifier list (PIDL), and returns a specified interface pointer on the parent object.
SHBrowseForFolderA

Displays a dialog box that enables the user to select a Shell folder. (ANSI)
SHBrowseForFolderW

Displays a dialog box that enables the user to select a Shell folder. (Unicode)
SHChangeNotification_Lock

Locks the shared memory associated with a Shell change notification event.
SHChangeNotification_Unlock

Unlocks shared memory for a change notification.
SHChangeNotify

Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.
SHChangeNotifyDeregister

Unregisters the client's window process from receiving SHChangeNotify messages.
SHChangeNotifyRegister

Registers a window to receive notifications from the file system or Shell, if the file system supports notifications.
SHCloneSpecialIDList

SHCloneSpecialIDList may be altered or unavailable. Instead, use SHGetSpecialFolderLocation.
SHCLSIDFromString

Takes the string form of a class identifier (CLSID) and creates the corresponding CLSID.
SHCoCreateInstance

SHCoCreateInstance may be altered or unavailable. Instead, use CoCreateInstance.
SHCreateDataObject

Creates a data object in a parent folder.
SHCreateDefaultContextMenu

Creates an object that represents the Shell's default context menu implementation.
SHCreateDirectory

Creates a new file system folder.
SHCreateDirectoryExA

Creates a new file system folder, with optional security attributes. (ANSI)
SHCreateDirectoryExW

Creates a new file system folder, with optional security attributes. (Unicode)
SHCreateFileExtractIconA

SHCreateFileExtractIcon may be altered or unavailable. (ANSI)
SHCreateFileExtractIconW

SHCreateFileExtractIcon may be altered or unavailable. (Unicode)
SHCreateShellFolderView

Creates a new instance of the default Shell folder view object (DefView).
SHCreateShellFolderViewEx

Creates a new instance of the default Shell folder view object. It is recommended that you use SHCreateShellFolderView rather than this function.
SHCreateShellItem

Creates an IShellItem object.
SHCreateStdEnumFmtEtc

SHCreateStdEnumFmtEtc may be altered or unavailable.
SHDefExtractIconA

Provides a default handler to extract an icon from a file. (ANSI)
SHDefExtractIconW

Provides a default handler to extract an icon from a file. (Unicode)
SHDestroyPropSheetExtArray

Frees property sheet handlers that are pointed to an array created by SHCreatePropSheetExtArray.
SHDoDragDrop

Executes a drag-and-drop operation. Supports drag source creation on demand, as well as drag images.
Shell_GetCachedImageIndex

Shell_GetCachedImageIndex may be altered or unavailable.
Shell_GetCachedImageIndexA

Shell_GetCachedImageIndex may be altered or unavailable. (ANSI)
Shell_GetCachedImageIndexW

Shell_GetCachedImageIndex may be altered or unavailable. (Unicode)
Shell_GetImageLists

Retrieves system image lists for large and small icons.
Shell_MergeMenus

Shell_MergeMenus may be altered or unavailable.
SHFind_InitMenuPopup

SHFind_InitMenuPopup may be altered or unavailable.
SHFindFiles

SHFindFiles may be altered or unavailable.
SHFlushSFCache

SHFlushSFCache may be altered or unavailable.
SHFormatDrive

SHFormatDrive may be altered or unavailable.
SHFree

Frees the memory allocated by SHAlloc.
SHGetAttributesFromDataObject

SHGetAttributesFromDataObject may be altered or unavailable.
SHGetDataFromIDListA

Retrieves extended property data from a relative identifier list. (ANSI)
SHGetDataFromIDListW

Retrieves extended property data from a relative identifier list. (Unicode)
SHGetDesktopFolder

Retrieves the IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
SHGetFolderLocation

Deprecated. Retrieves the path of a folder as an ITEMIDLIST structure.
SHGetFolderPathA

Deprecated. (SHGetFolderPathA)
SHGetFolderPathAndSubDirA

Gets the path of a folder and appends a user-provided subfolder path. (ANSI)
SHGetFolderPathAndSubDirW

Gets the path of a folder and appends a user-provided subfolder path. (Unicode)
SHGetFolderPathW

Deprecated. (SHGetFolderPathW)
SHGetIconOverlayIndexA

Returns the index of the overlay icon in the system image list. (ANSI)
SHGetIconOverlayIndexW

Returns the index of the overlay icon in the system image list. (Unicode)
SHGetInstanceExplorer

Retrieves an interface that allows hosted Shell extensions and other components to prevent their host process from closing prematurely.
SHGetKnownFolderIDList

Retrieves the path of a known folder as an ITEMIDLIST structure.
SHGetKnownFolderItem

Retrieves an IShellItem object that represents a known folder.
SHGetKnownFolderPath

Retrieves the full path of a known folder identified by the folder's KNOWNFOLDERID.
SHGetMalloc

Retrieves a pointer to the Shell's IMalloc interface.
SHGetPathFromIDListA

Converts an item identifier list to a file system path. (ANSI)
SHGetPathFromIDListEx

Converts an item identifier list to a file system path. This function extends SHGetPathFromIDList by allowing you to set the initial size of the string buffer and declare the options below.
SHGetPathFromIDListW

Converts an item identifier list to a file system path. (Unicode)
SHGetRealIDL

SHGetRealIDL may be altered or unavailable.
SHGetSetFolderCustomSettings

SHGetSetFolderCustomSettings may be altered or unavailable.
SHGetSetSettings

SHGetSetSettings may be altered or unavailable.
SHGetSettings

Retrieves the current Shell option settings.
SHGetSpecialFolderLocation

SHGetSpecialFolderLocation is not supported and may be altered or unavailable in the future. Instead, use SHGetFolderLocation.
SHGetSpecialFolderPathA

SHGetSpecialFolderPath is not supported. Instead, use ShGetFolderPath. (ANSI)
SHGetSpecialFolderPathW

SHGetSpecialFolderPath is not supported. Instead, use ShGetFolderPath. (Unicode)
SHHandleUpdateImage

SHHandleUpdateImage may be altered or unavailable.
SHILCreateFromPath

SHILCreateFromPath may be altered or unavailable.
SHLimitInputEdit

Sets limits on valid characters for an edit control.
SHLoadInProc

Creates an instance of the specified object class from within the context of the Shell's process. Windows Vista and later:_This function has been disabled and returns E_NOTIMPL.
SHMapPIDLToSystemImageListIndex

SHMapPIDLToSystemImageListIndex may be altered or unavailable.
SHObjectProperties

SHObjectProperties may be altered or unavailable.
SHOpenFolderAndSelectItems

Opens a Windows Explorer window with specified items in a particular folder selected.
SHOpenWithDialog

Displays the Open With dialog box.
SHParseDisplayName

Translates a Shell namespace object's display name into an item identifier list and returns the attributes of the object. This function is the preferred method to convert a string to a pointer to an item identifier list (PIDL).
SHPathPrepareForWriteA

Checks to see if the path exists. (ANSI)
SHPathPrepareForWriteW

Checks to see if the path exists. (Unicode)
SHPropStgCreate

Ensures proper handling of code page retrieval or assignment for the requested property set operation.
SHPropStgReadMultiple

Wraps the IPropertyStorage::ReadMultiple function to ensure that ANSI and Unicode translations are handled properly for deprecated property sets.
SHPropStgWriteMultiple

Wraps the IPropertyStorage::WriteMultiple function to ensure that ANSI and Unicode translations are handled properly for deprecated property sets.
SHReplaceFromPropSheetExtArray

Requests each property sheet in a property sheet extension array to replace pages. Each page is allowed up to one replacement.
SHRestricted

SHRestricted may be altered or unavailable.
SHSetFolderPathA

Deprecated. Assigns a new path to a system folder identified by its CSIDL. (ANSI)
SHSetFolderPathW

Deprecated. Assigns a new path to a system folder identified by its CSIDL. (Unicode)
SHSetInstanceExplorer

Provides an interface that allows hosted Shell extensions and other components to prevent their host process from closing prematurely.
SHSetKnownFolderPath

Redirects a known folder to a new location.
SHShellFolderView_Message

SHShellFolderView_Message may be altered or unavailable.
SHStartNetConnectionDialogA

SHStartNetConnectionDialog may be altered or unavailable. (ANSI)
SHStartNetConnectionDialogW

SHStartNetConnectionDialog may be altered or unavailable. (Unicode)
SHUpdateImageA

Notifies the Shell that an image in the system image list has changed. (ANSI)
SHUpdateImageW

Notifies the Shell that an image in the system image list has changed. (Unicode)
SHValidateUNC

SHValidateUNC may be altered or unavailable.
SignalFileOpen

SignalFileOpen may be altered or unavailable.
StgMakeUniqueName

Creates a unique name for a stream or storage object from a template.
Win32DeleteFile

Win32DeleteFile may be altered or unavailable.
WriteCabinetState

WriteCabinetState may be altered or unavailable.

Callback functions

 
BFFCALLBACK

Receives event notifications from the Active Directory Domain Services container browser dialog box.
LPFNDFMCALLBACK

LPFNDFMCALLBACK may be altered or unavailable.
LPFNVIEWCALLBACK

Defines the prototype for the callback function used by the system folder view object. This function essentially duplicates the functionality of IShellFolderViewCB.

Structures

 
AUTO_SCROLL_DATA

AUTO_SCROLL_DATA may be altered or unavailable.
BROWSEINFOA

Contains parameters for the SHBrowseForFolder function and receives information about the folder selected by the user. (ANSI)
BROWSEINFOW

Contains parameters for the SHBrowseForFolder function and receives information about the folder selected by the user. (Unicode)
CABINETSTATE

CABINETSTATE may be altered or unavailable.
CIDA

Used with the CFSTR_SHELLIDLIST clipboard format to transfer the pointer to an item identifier list (PIDL) of one or more Shell namespace objects.
COMPONENT

Used by Windows 2000 to hold information about a component. This structure replaces the IE4COMPONENT structure.
COMPONENTSOPT

Contains the desktop item options.
COMPPOS

Holds information about a component's position and size.
COMPSTATEINFO

Used by Windows 2000 to hold information about a component's state.
CSFV

Used with the SHCreateShellFolderViewEx function.
DATABLOCK_HEADER

Serves as the header for some of the extra data structures used by IShellLinkDataList.
DEFCONTEXTMENU

Contains context menu information used by SHCreateDefaultContextMenu.
DETAILSINFO

Contains detail information for a Shell folder item. Used with the SFVM_GETDETAILSOF notification.
DFMICS

Contains additional arguments used by DFM_INVOKECOMMANDEX.
DROPDESCRIPTION

Describes the image and accompanying text for a drop object.
DROPFILES

Defines the CF_HDROP clipboard format. The data that follows is a double null-terminated list of file names.
EXP_DARWIN_LINK

Holds an extra data block used by IShellLinkDataList. It holds the link's Windows Installer ID.
EXP_PROPERTYSTORAGE

Stores information about the Shell link state. This structure is used for extra data sections that are tagged with EXP_PROPERTYSTORAGE_SIG.
EXP_SPECIAL_FOLDER

Holds an extra data block used by IShellLinkDataList. It holds special folder information.
EXP_SZ_LINK

Holds an extra data block used by IShellLinkDataList. It holds expandable environment strings for the icon or target.
FILE_ATTRIBUTES_ARRAY

Contains the clipboard format definition for CFSTR_FILE_ATTRIBUTES_ARRAY.
FILEDESCRIPTORA

Describes the properties of a file that is being copied by means of the clipboard during a Microsoft ActiveX drag-and-drop operation. (ANSI)
FILEDESCRIPTORW

Describes the properties of a file that is being copied by means of the clipboard during a Microsoft ActiveX drag-and-drop operation. (Unicode)
FILEGROUPDESCRIPTORA

Defines the CF_FILEGROUPDESCRIPTOR clipboard format. (ANSI)
FILEGROUPDESCRIPTORW

Defines the CF_FILEGROUPDESCRIPTOR clipboard format. (Unicode)
IE4COMPONENT

Used by Microsoft Internet Explorer 4.0 and Microsoft Internet Explorer 4.01 to hold information about a component. With Windows 2000, it is replaced by the COMPONENT structure.
ITEMSPACING

Stores the dimensions of the two possible sizes of icon spacing that are available for display:_small and large. Used by IShellFolderView::GetItemSpacing.
NRESARRAY

Defines the CF_NETRESOURCE clipboard format.
NT_CONSOLE_PROPS

Holds an extra data block used by IShellLinkDataList. It holds console properties.
NT_FE_CONSOLE_PROPS

Holds an extra data block used by IShellLinkDataList. It holds the console's code page.
OPENASINFO

Stores information for the SHOpenWithDialog function.
PROPPRG

This structure contains information from a .pif file. It is used by PifMgr_GetProperties.
QCMINFO

Contains information for merging menu items into Windows Explorer menus.
SFV_CREATE

This structure is used with the SHCreateShellFolderView function.
SFVM_HELPTOPIC_DATA

Contains the name of an HTML Help file and a topic in that file. Used with the SFVM_GETHELPTOPIC notification. This structure requires Unicode strings.
SFVM_PROPPAGE_DATA

Contains the details of a page to be added to an object's Properties sheet.
SHARDAPPIDINFO

Contains data used by SHAddToRecentDocs to identify both an item�in this case as an IShellItem�and the process that it is associated with.
SHARDAPPIDINFOIDLIST

Contains data used by SHAddToRecentDocs to identify both an item�in this case by an absolute pointer to an item identifier list (PIDL)�and the process that it is associated with.
SHARDAPPIDINFOLINK

Contains data used by SHAddToRecentDocs to identify both an item, in this case through an IShellLink, and the process that it is associated with.
SHChangeDWORDAsIDList

SHChangeDWORDAsIDList may be altered or unavailable.
SHChangeNotifyEntry

Contains and receives information for change notifications. This structure is used with the SHChangeNotifyRegister function and the SFVM_QUERYFSNOTIFY notification.
SHChangeUpdateImageIDList

SHChangeUpdateImageIDList may be altered or unavailable.
SHDESCRIPTIONID

Receives item data in response to a call to SHGetDataFromIDList.
SHELLFLAGSTATE

Contains a set of flags that indicate the current Shell settings. This structure is used with the SHGetSettings function.
SHELLSTATEA

Contains settings for the Shell's state. This structure is used with the SHGetSetSettings function. (ANSI)
SHELLSTATEW

Contains settings for the Shell's state. This structure is used with the SHGetSetSettings function. (Unicode)
SHFOLDERCUSTOMSETTINGS

Holds custom folder settings. This structure is used with the SHGetSetFolderCustomSettings function.
WALLPAPEROPT

Contains the wallpaper display options. Used with members of the IActiveDesktop interface.

Enumerations

 
AUTOCOMPLETELISTOPTIONS

Specifies which objects are enumerated for autocompletion lists.
DROPIMAGETYPE

Values used with the DROPDESCRIPTION structure to specify the drop image.
IESHORTCUTFLAGS

Specifies how a shortcut should be handled by the browser.
KNOWN_FOLDER_FLAG

Defines constants that specify special retrieval options for known folders. These values supersede CSIDL values, which have parallel meanings.
RESTRICTIONS

These flags are used with the SHRestricted function.
SCNRT_STATUS

Indicates whether to enable or disable Async Register and Deregister for SHChangeNotifyRegisterThread.
SHARD

Indicates the interpretation of the data passed by SHAddToRecentDocs in its pv parameter to identify the item whose usage statistics are being tracked.
SHELL_LINK_DATA_FLAGS

Specifies option settings. Used with IShellLinkDataList::GetFlags and IShellLinkDataList::SetFlags.