Skip to content

Latest commit

 

History

History
124 lines (79 loc) · 4.79 KB

nf-shellapi-extractassociatediconexw.md

File metadata and controls

124 lines (79 loc) · 4.79 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shellapi.ExtractAssociatedIconExW
ExtractAssociatedIconExW function (shellapi.h)
ExtractAssociatedIconEx may be altered or unavailable. (Unicode)
ExtractAssociatedIconEx
ExtractAssociatedIconEx function [Windows Shell]
ExtractAssociatedIconExW
_win32_ExtractAssociatedIconEx
shell.ExtractAssociatedIconEx
shellapi/ExtractAssociatedIconEx
shellapi/ExtractAssociatedIconExW
shell\ExtractAssociatedIconEx.htm
shell
f32260b0-917b-4406-aeee-34f71a7c7309
12/05/2018
ExtractAssociatedIconEx, ExtractAssociatedIconEx function [Windows Shell], ExtractAssociatedIconExA, ExtractAssociatedIconExW, _win32_ExtractAssociatedIconEx, shell.ExtractAssociatedIconEx, shellapi/ExtractAssociatedIconEx, shellapi/ExtractAssociatedIconExA, shellapi/ExtractAssociatedIconExW
shellapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
ExtractAssociatedIconExW (Unicode) and ExtractAssociatedIconExA (ANSI)
Shell32.lib
Shell32.dll (version 5.0 or later)
Windows
19H1
ExtractAssociatedIconExW
shellapi/ExtractAssociatedIconExW
c++
APIRef
kbSyntax
DllExport
Shell32.dll
ExtractAssociatedIconEx
ExtractAssociatedIconExA
ExtractAssociatedIconExW

ExtractAssociatedIconExW function

-description

[ExtractAssociatedIconEx is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Gets a handle to an icon stored as a resource in a file or an icon stored in a file's associated executable file. It extends the ExtractAssociatedIcon function by retrieving the icon's ID when that icon is extracted from an executable file.

-parameters

-param hInst [in]

Type: HINSTANCE

The handle of the module from which to extract the icon.

-param pszIconPath [in, out]

Type: LPTSTR

Pointer to a string that, on entry, specifies the full path and file name of the file that contains the icon. The function extracts the icon handle from that file, or from an executable file associated with that file.

When this function returns, if the icon handle was obtained from an executable file (either an executable file directly pointed to by this parameter or an associated executable file) the function stores the full path and file name of that executable in the buffer pointed to by this parameter.

-param piIconIndex [in, out]

Type: LPWORD

Pointer to a WORD value that, on entry, specifies the index of the icon whose handle is to be obtained.

When the function returns, if the icon handle was obtained from an executable file (either an executable file pointed to by lpIconPath or an associated executable file), this value points to the icon's index in that file.

-param piIconId [in, out]

Type: LPWORD

Pointer to a WORD value that, on entry, specifies the ID of the icon whose handle is to be obtained.

When the function returns, if the icon handle was obtained from an executable file (either an executable file pointed to by lpIconPath or an associated executable file), this value points to the icon's ID within that file.

-returns

Type: HICON

Returns the icon's handle if successful, otherwise NULL.

-remarks

The icon handle returned by this function must be released by calling DestroyIcon when it is no longer needed.

Note

The shellapi.h header defines ExtractAssociatedIconEx as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

ExtractAssociatedIcon

ExtractIcon

ExtractIconEx