Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 2.97 KB

nf-shobjidl_core-iassochandler-geticonlocation.md

File metadata and controls

79 lines (62 loc) · 2.97 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:shobjidl_core.IAssocHandler.GetIconLocation
IAssocHandler::GetIconLocation (shobjidl_core.h)
Retrieves the location of the icon associated with the application.
GetIconLocation
GetIconLocation method [Windows Shell]
GetIconLocation method [Windows Shell]
IAssocHandler interface
IAssocHandler interface [Windows Shell]
GetIconLocation method
IAssocHandler.GetIconLocation
IAssocHandler::GetIconLocation
_shell_IAssocHandler_GetIconLocation
shell.IAssocHandler_GetIconLocation
shobjidl_core/IAssocHandler::GetIconLocation
shell\IAssocHandler_GetIconLocation.htm
shell
4b883c2c-6845-4e53-b41b-83c09091ee53
12/05/2018
GetIconLocation, GetIconLocation method [Windows Shell], GetIconLocation method [Windows Shell],IAssocHandler interface, IAssocHandler interface [Windows Shell],GetIconLocation method, IAssocHandler.GetIconLocation, IAssocHandler::GetIconLocation, _shell_IAssocHandler_GetIconLocation, shell.IAssocHandler_GetIconLocation, shobjidl_core/IAssocHandler::GetIconLocation
shobjidl_core.h
Shobjidl.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Shobjidl.idl
Windows
19H1
IAssocHandler::GetIconLocation
shobjidl_core/IAssocHandler::GetIconLocation
c++
APIRef
kbSyntax
COM
shobjidl_core.h
IAssocHandler.GetIconLocation

IAssocHandler::GetIconLocation

-description

Retrieves the location of the icon associated with the application.

-parameters

-param ppszPath [out]

Type: LPWSTR*

When this method returns, contains the address of a pointer to a null-terminated, Unicode string that contains the path to the application's icon.

-param pIndex [out]

Type: int*

When this method returns, contains a pointer to the index of the icon within the resource named in ppszPath.

-returns

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

If the icon cannot be found, the function will return the path to the executable, and an icon index of zero.

For performance reasons, an application may use the Shell image cache to retrieve the icon, rather than loading the icon directly from the path returned. The path and icon index can be passed directly to Shell_GetCachedImageIndex. One benefit of this is that the Shell cache can provide a default icon in the event that no icon was available for the application.