Leadtools.Wia Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
EnumChildItems Method
See Also 
Leadtools.Wia Namespace > WiaSession Class : EnumChildItems Method



parentItem
Handle to the item which represents the root item having its child items enumerated.
parentItem
Handle to the item which represents the root item having its child items enumerated.
Enumerates all available child items for the root item specified in the parentItem parameter.

Syntax

Visual Basic (Declaration) 
Public Sub EnumChildItems( _
   ByVal parentItem As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As WiaSession
Dim parentItem As Object
 
instance.EnumChildItems(parentItem)
C# 
public void EnumChildItems( 
   object parentItem
)
C++/CLI 
public:
void EnumChildItems( 
   Object^ parentItem
) 

Parameters

parentItem
Handle to the item which represents the root item having its child items enumerated.

Example

For an example, refer to WiaSession.GetRootItem.

Remarks

The WIA run-time system represents each WIA hardware device in a hierarchical tree of items. This function enables applications to enumerate the child items for the specified root item.

Pass a valid parentItem parameter. To do so, retrieve a pointer to the device’s root Item itself by calling the WiaSession.GetRootItem method and then pass the retrieved item to the EnumChildItems method as the parent item for the child items.

Each enumerated item will be sent to the user through the WiaSession.EnumItemsEvent event. Add this event when enumerating the device's child items. To cancel the enumeration proces, add the WiaSession.EnumItemsEvent event and then set the Cancel member of the WiaEnumItemsEventArgs to true.

For each received item through the WiaSession.EnumItemsEvent event call FreeItem method. Save the received items in a list or array and when the list is not needed anymore, loop through the list items and call the FreeItem method for each of them.

For more information, refer to Managing WIA Sources.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Vista, Windows Server 2003 family, Windows Server 2008 family

See Also