IShellItemImageFactoryGetImage Method

Gets an HBITMAP that represents an IShellItem. The default behavior is to load a thumbnail. If there is no thumbnail for the current IShellItem, it retrieves an HBITMAP for the icon of the item. The thumbnail or icon is extracted if it is not currently cached.

Definition

Namespace: DevCase.Win32.Interfaces
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[PreserveSigAttribute]
HResult GetImage(
	Size size,
	IShellItemImageFactoryGetImageFlags flags,
	ref IntPtr phbm
)

Parameters

size  Size
A structure that specifies the size of the image to be received.
flags  IShellItemImageFactoryGetImageFlags
One or more of the IShellItemImageFactoryGetImageFlags flags.
phbm  IntPtr
Pointer to a value that, when this method returns successfully, receives the handle of the retrieved bitmap.

It is the responsibility of the caller to free this retrieved resource through DeleteObject(IntPtr) function when it is no longer needed.

Return Value

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

See Also