Edit

Share via


shellapi.h header

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

shellapi.h contains the following programming interfaces:

Functions

 
AssocCreateForClasses

Retrieves an object that implements an IQueryAssociations interface.
CommandLineToArgvW

Parses a Unicode command line string and returns an array of pointers to the command line arguments, along with a count of such arguments, in a way that is similar to the standard C run-time argv and argc values.
DoEnvironmentSubstA

Parses an input string that contains references to one or more environment variables and replaces them with their fully expanded values. (ANSI)
DoEnvironmentSubstW

Parses an input string that contains references to one or more environment variables and replaces them with their fully expanded values. (Unicode)
DragAcceptFiles

Registers whether a window accepts dropped files.
DragFinish

Releases memory that the system allocated for use in transferring file names to the application.
DragQueryFileA

Retrieves the names of dropped files that result from a successful drag-and-drop operation. (ANSI)
DragQueryFileW

Retrieves the names of dropped files that result from a successful drag-and-drop operation. (Unicode)
DragQueryPoint

Retrieves the position of the mouse pointer at the time a file was dropped during a drag-and-drop operation.
DuplicateIcon

Creates a duplicate of a specified icon.
ExtractAssociatedIconA

Gets a handle to an icon stored as a resource in a file or an icon stored in a file's associated executable file. (ANSI)
ExtractAssociatedIconExA

ExtractAssociatedIconEx may be altered or unavailable. (ANSI)
ExtractAssociatedIconExW

ExtractAssociatedIconEx may be altered or unavailable. (Unicode)
ExtractAssociatedIconW

Gets a handle to an icon stored as a resource in a file or an icon stored in a file's associated executable file. (Unicode)
ExtractIconA

Gets a handle to an icon from the specified executable file, DLL, or icon file. To retrieve an array of handles to large or small icons, use the ExtractIconEx function. (ANSI)
ExtractIconExA

The ExtractIconEx function creates an array of handles to large or small icons extracted from the specified executable file, DLL, or icon file. (ANSI)
ExtractIconExW

The ExtractIconEx function creates an array of handles to large or small icons extracted from the specified executable file, DLL, or icon file. (Unicode)
ExtractIconW

Gets a handle to an icon from the specified executable file, DLL, or icon file. To retrieve an array of handles to large or small icons, use the ExtractIconEx function. (Unicode)
FindExecutableA

Retrieves the name of and handle to the executable (.exe) file associated with a specific document file. (ANSI)
FindExecutableW

Retrieves the name of and handle to the executable (.exe) file associated with a specific document file. (Unicode)
InitNetworkAddressControl

Initializes the network address control window class.
NetAddr_DisplayErrorTip

Displays an error message in the balloon tip associated with the network address control.
NetAddr_GetAddress

Indicates whether a network address conforms to a specified type and format.
NetAddr_GetAllowType

Retrieves the network address types that a specified network address control accepts.
NetAddr_SetAllowType

Sets the network address types that a specified network address control accepts.
SHAppBarMessage

Sends an appbar message to the system.
SHCreateProcessAsUserW

Creates a new user-mode process and its primary thread to run a specified executable file.
Shell_NotifyIconA

Sends a message to the taskbar's status area. (ANSI)
Shell_NotifyIconGetRect

Gets the screen coordinates of the bounding rectangle of a notification icon.
Shell_NotifyIconW

Sends a message to the taskbar's status area. (Unicode)
ShellAboutA

Displays a ShellAbout dialog box. (ANSI)
ShellAboutW

Displays a ShellAbout dialog box. (Unicode)
ShellExecuteA

Performs an operation on a specified file. (ShellExecuteA)
ShellExecuteExA

Performs an operation on a specified file. (ShellExecuteExA)
ShellExecuteExW

Performs an operation on a specified file. (ShellExecuteExW)
ShellExecuteW

Performs an operation on a specified file. (ShellExecuteW)
ShellMessageBoxA

ShellMessageBox may be altered or unavailable. (ANSI)
ShellMessageBoxW

ShellMessageBox may be altered or unavailable. (Unicode)
SHEmptyRecycleBinA

Empties the Recycle Bin on the specified drive. (ANSI)
SHEmptyRecycleBinW

Empties the Recycle Bin on the specified drive. (Unicode)
SHEnumerateUnreadMailAccountsA

Enumerates the user accounts that have unread email. (ANSI)
SHEnumerateUnreadMailAccountsW

Enumerates the user accounts that have unread email. (Unicode)
SHEvaluateSystemCommandTemplate

Enforces strict validation of parameters used in a call to CreateProcess or ShellExecute.
SHFileOperationA

Copies, moves, renames, or deletes a file system object. This function has been replaced in Windows Vista by IFileOperation.
SHFileOperationW

Copies, moves, renames, or deletes a file system object. On Windows Vista and later releases, we recommend that you use IFileOperation instead of this function.
SHFreeNameMappings

Frees a file name mapping object that was retrieved by the SHFileOperation function.
SHGetDiskFreeSpaceExA

Retrieves disk space information for a disk volume. (ANSI)
SHGetDiskFreeSpaceExW

Retrieves disk space information for a disk volume. (Unicode)
SHGetDriveMedia

Returns the type of media that is in the given drive.
SHGetFileInfoA

Retrieves information about an object in the file system, such as a file, folder, directory, or drive root. (ANSI)
SHGetFileInfoW

Retrieves information about an object in the file system, such as a file, folder, directory, or drive root. (Unicode)
SHGetImageList

Retrieves an image list.
SHGetLocalizedName

Retrieves the localized name of a file in a Shell folder.
SHGetNewLinkInfoA

Creates a name for a new shortcut based on the shortcut's proposed target. This function does not create the shortcut, just the name. (ANSI)
SHGetNewLinkInfoW

Creates a name for a new shortcut based on the shortcut's proposed target. This function does not create the shortcut, just the name. (Unicode)
SHGetPropertyStoreForWindow

Retrieves an object that represents a specific window's collection of properties, which allows those properties to be queried or set.
SHGetStockIconInfo

Retrieves information about system-defined Shell icons.
SHGetUnreadMailCountA

Retrieves a specified user's unread message count for any or all email accounts. (ANSI)
SHGetUnreadMailCountW

Retrieves a specified user's unread message count for any or all email accounts. (Unicode)
SHInvokePrinterCommandA

Executes a command on a printer object. (ANSI)
SHInvokePrinterCommandW

Executes a command on a printer object. (Unicode)
SHIsFileAvailableOffline

Determines whether a file or folder is available for offline use. This function also determines whether the file would be opened from the network, from the local Offline Files cache, or from both locations.
SHLoadNonloadedIconOverlayIdentifiers

Signals the Shell that during the next operation requiring overlay information, it should load icon overlay identifiers that either failed creation or were not present for creation at startup. Identifiers that have already been loaded are not affected.
SHQueryRecycleBinA

Retrieves the size of the Recycle Bin and the number of items in it, for a specified drive. (ANSI)
SHQueryRecycleBinW

Retrieves the size of the Recycle Bin and the number of items in it, for a specified drive. (Unicode)
SHQueryUserNotificationState

Checks the state of the computer for the current user to determine whether sending a notification is appropriate.
SHRemoveLocalizedName

Removes the localized name of a file in a Shell folder.
SHSetLocalizedName

Sets the localized name of a file in a Shell folder.
SHSetUnreadMailCountA

Stores the current user's unread message count for a specified email account in the registry. (ANSI)
SHSetUnreadMailCountW

Stores the current user's unread message count for a specified email account in the registry. (Unicode)
SHTestTokenMembership

Uses CheckTokenMembership to test whether the given token is a member of the local group with the specified RID.

Structures

 
APPBARDATA

Contains information about a system appbar message.
ASSOCIATIONELEMENT

Defines information used by AssocCreateForClasses to retrieve an IQueryAssociations interface for a given file association.
NC_ADDRESS

Contains information that describes a network address.
NOTIFYICONDATAA

Contains information that the system needs to display notifications in the notification area. Used by Shell_NotifyIcon. (ANSI)
NOTIFYICONDATAW

Contains information that the system needs to display notifications in the notification area. Used by Shell_NotifyIcon. (Unicode)
NOTIFYICONIDENTIFIER

Contains information used by Shell_NotifyIconGetRect to identify the icon for which to retrieve the bounding rectangle.
OPEN_PRINTER_PROPS_INFOA

Identifies a particular property sheet in a printer's property pages and whether that property sheet should be modal. Optionally used with the SHInvokePrinterCommand function. (ANSI)
OPEN_PRINTER_PROPS_INFOW

Identifies a particular property sheet in a printer's property pages and whether that property sheet should be modal. Optionally used with the SHInvokePrinterCommand function. (Unicode)
SHCREATEPROCESSINFOW

Contains the information needed by SHCreateProcessAsUserW to create a process.
SHELLEXECUTEINFOA

Contains information used by ShellExecuteEx. (ANSI)
SHELLEXECUTEINFOW

Contains information used by ShellExecuteEx. (Unicode)
SHFILEINFOA

Contains information about a file object. (ANSI)
SHFILEINFOW

Contains information about a file object. (Unicode)
SHFILEOPSTRUCTA

Contains information that the SHFileOperation function uses to perform file operations. (ANSI)
SHFILEOPSTRUCTW

Contains information that the SHFileOperation function uses to perform file operations. (Unicode)
SHNAMEMAPPINGA

Contains the old and new path names for each file that was moved, copied, or renamed by the SHFileOperation function. (ANSI)
SHNAMEMAPPINGW

Contains the old and new path names for each file that was moved, copied, or renamed by the SHFileOperation function. (Unicode)
SHQUERYRBINFO

Contains the size and item count information retrieved by the SHQueryRecycleBin function.
SHSTOCKICONINFO

Receives information used to retrieve a stock Shell icon. This structure is used in a call SHGetStockIconInfo.

Enumerations

 
QUERY_USER_NOTIFICATION_STATE

Specifies the state of the machine for the current user in relation to the propriety of sending a notification. Used by SHQueryUserNotificationState.
SHSTOCKICONID

Used by SHGetStockIconInfo to identify which stock system icon to retrieve.