#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaEnumChildItems(hSession, pWiaRootItem, pfnCallBack, pUserData)


handle to an existing WIA session

L_VOID* pWiaRootItem;

pointer to IWiaItem or IWiaItem2 interface


pointer to an optional callback function

L_VOID * pUserData;

pointer to additional parameters

Enumerate all available child items for the root item specified in the pWiaRootItem parameter.




Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.


Valid pointer to a type IWiaItem or IWiaItem2 object (IWiaItem if using WIA Version 1.0; IWiaItem2 if using WIA Version 2.0), which represents the root item for which its child items are being enumerated.


Option pointer to a callback function that receives a pointer to each child item found.


Void pointer that you can use to pass one or more additional parameters that the callback function needs.


To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure.


If the additional parameters are not needed, you can pass NULL in this parameter.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


This feature is available in 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). This function enables applications to enumerate the child items for the specified root item.

You should pass a valid pWiaRootItem parameter. First you need to 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 L_WiaGetRootItem function (do not forget to cast it to (L_VOID**)). Then you can pass this same declared variable (after the L_WiaGetRootItem function fills it with a valid item) to the L_WiaEnumChildItems function as the root item for which you wish to enumerate the child items.

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


LEADTOOLS WIA supports both 32-bit and 64-bit image acquisition for both WIA 1.0 (XP and earlier) and WIA 2.0 (VISTA and later).

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.