Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SHMapIDListToImageListIndexAsync function

[This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It is not available as of Windows Vista.]

Retrieves an index in the system image list when given an IShellFolder and an ITEMIDLIST that is contained in it. This function also gets the final icon from the callback if necessary.

Syntax


HRESULT SHMapIDListToImageListIndexAsync(
  IShellTaskScheduler *pts,
  IShellFolder *psf,
  LPCITEMIDLIST pidl,
  UINT flags,
  PFNASYNCICONTASKBALLBACK pfn,
  void *pvData,
  void *pvHint,
  int *piIndex,
  int *piIndexSel
);

Parameters

pts

Type: IShellTaskScheduler*

The task scheduler interface to create the background task.

psf

Type: IShellFolder*

The Shell folder that relates to the pidl.

pidl

Type: LPCITEMIDLIST

The item whose icon is requested.

flags

Type: UINT

Flags to control the operation.

GIL_OPENICON

Allows containers to specify an "open" look.

GIL_FORSHELL

Icon is displayed in a Shell folder.

GIL_ASYNC

Asynchronous extract that returns E_PENDING.

GIL_DEFAULTICON

Get the default icon location if the final one takes too long.

GIL_FORSHORTCUT

The icon is for a shortcut to the object.

pfn

Type: PFNASYNCICONTASKBALLBACK

The PFNASYNCICONTASKBALLBACK callback function called when the background task is done.

pvData

Type: void*

The user data passed back in the PFNASYNCICONTASKBALLBACK callback.

pvHint

Type: void*

The user data passed back in the PFNASYNCICONTASKBALLBACK callback.

piIndex

Type: int*

The icon index returned. This is the temporary index if the function returns E_PENDING. The final index is provided through the callback function.

piIndexSel

Type: int*

Optional icon index for the open icon case (GIL_OPENICON).

Return value

Type: HRESULT

This function can return one of these values.

Return codeDescription
S_OK

All requested information was available.

E_PENDING

The function will receive temporary icons, and will be called back asynchronously with the final icons.

Other failure codes

The function failed.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows XP with SP2

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 5.0 or later)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.