EnumShellItems

wraps the IEnumShellItems interface and exposes enumeration of IShellItem interfaces.

Authors

License

Documentation

Requirements

AutoHotkeyAHK v2 alpha
OSWindows Vista / Windows Server 2008 or higher
Base classesUnknown
Other classesShellItem
Summary
EnumShellItemswraps the IEnumShellItems interface and exposes enumeration of IShellItem interfaces.
Variables
IIDThis is IID_IEnumShellItems.
ThrowOnCreationIndicates that attempting to create an instance of this class without supplying a valid pointer should throw an exception.
Functions
NextGets an array of one or more IShellItem interfaces from the enumeration.
SkipSkips a given number of IShellItem interfaces in the enumeration.
ResetResets the internal count of retrieved IShellItem interfaces in the enumeration.
CloneGets a copy of the current enumeration.

Variables

IID

This is IID_IEnumShellItems.  It is required to create an instance.

ThrowOnCreation

Indicates that attempting to create an instance of this class without supplying a valid pointer should throw an exception.

Functions

Next

Next( count,  
byRef array,  
byRef retrievedCount : =  "")

Gets an array of one or more IShellItem interfaces from the enumeration.

Parameters

UINT countthe number of items to retrieve
byRef var arrayreceives an array of pointers to IShellItem interfaces that receive the enumerated item or items.  The calling application is responsible for freeing the IShellItem interfaces by calling the IUnknown::Release method.
[opt] byRef UINT retrievedCountreceives the number of items actually retrieved.

Returns

BOOL successtrue on success, false otherwise

Example

enum := new EnumShellItems(ptr) ; ptr must be a valid pointer
enum.Next(2, array)
MsgBox % "The first item's memory pointer: " . NumGet(&array, 0, "UPtr")

Skip

Skip(count)

Skips a given number of IShellItem interfaces in the enumeration.

Parameters

UINT countthe number of items to skip

Returns

BOOL successtrue on success, false otherwise

Reset

Reset()

Resets the internal count of retrieved IShellItem interfaces in the enumeration.

Returns

BOOL successtrue on success, false otherwise

Clone

Clone()

Gets a copy of the current enumeration.

Returns

EnumShellItems copya copy of this enumeration
Next( count,  
byRef array,  
byRef retrievedCount : =  "")
Gets an array of one or more IShellItem interfaces from the enumeration.
Skip(count)
Skips a given number of IShellItem interfaces in the enumeration.
Reset()
Resets the internal count of retrieved IShellItem interfaces in the enumeration.
Clone()
Gets a copy of the current enumeration.