Enumerates all available child items for the root item specified in the pWiaRootItem parameter.
#include "ltwrappr.h"
virtual L_INT LWia::EnumChildItems(pWiaRootItem)
Valid pointer to a type IWiaItem or IWiaItem2 object (IWiaItem if using WIA Version 1.0 or IWiaItem2 if using WIA Version 2.0), representing the root item for which its child items are being enumerated.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This feature is available in LEADTOOLS version 16 or higher.
The WIA run-time system represents each WIA hardware device in a hierarchical tree of IWiaItem or IWiaItem2 objects (IWiaItem objects if WIA Version 1.0 is being used; IWiaItem2 objects if WIA Version 2.0 is being used). Use LWia::EnumChildItems in applications to enumerate the child items for the specified root item.
Be sure to pass a valid pWiaRootItem parameter. To do so, first retrieve a pointer to the device's root Item itself by declaring a variable pointer of type IWiaItem* or IWiaItem2*. Next, pass the address of that pointer to the third parameter of the LWia::GetRootItem function (do not forget to cast it to (L_VOID**)). Then pass this same declared variable (after LWia::GetRootItem fills it with a valid item) to LWia::EnumChildItems as the root item for which you wish to enumerate the child items.
For an example, refer to LWia::GetRootItem.