Click or drag to resize

ShellUtilitiesGetImage Method (IntPtr, Size, SIIGBF, Boolean)

Gets a bitmap that represents a Shell Item. 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.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static Bitmap GetImage(
	IntPtr pidl,
	Size size,
	SIIGBF flags = SIIGBF.SIIGBF_RESIZETOFIT,
	bool throwOnError = true
)

Parameters

pidl
Type: SystemIntPtr
The item's pidl.
size
Type: System.DrawingSize
The size of the image to be received.
flags (Optional)
Type: callback.ShellBoost.Core.WindowsShellSIIGBF
Options that specify how the image will be extracted.
throwOnError (Optional)
Type: SystemBoolean
if set to true errors may be throw in case of Windows Shell errors.

Return Value

Type: Bitmap
A bitmap or null.
Exceptions
ExceptionCondition
ArgumentExceptionpidl is zero.
See Also