LWia::EnumFormats

#include "ltwrappr.h"

virtual L_INT LWia::EnumFormats(pItem, uFlags)

Enumerates all available WIA driver transfer formats.

Parameters

L_VOID * pItem

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 item being enumerated.

Retrieve this parameter by either calling the LWia::GetRootItem function to get a pointer to the device's root item, or by enumerating the child items of the device by calling LWia::EnumChildItems.

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This feature is available in LEADTOOLS version 16 or higher.

This function enumerates all available WIA driver transfer formats for the specified acquisition source item.

Required DLLs and Libraries

See Also

Functions

Topics

Example

class CMyWIA : public LWia 
{ 
public: 
   L_INT WiaEnumFormatsCB(L_INT nFormatsCount, L_INT nTransferMode, GUID * pFormat); 
}; 
 
L_INT CMyWIA::WiaEnumFormatsCB(L_INT nFormatsCount, L_INT nTransferMode, GUID * pFormat) 
{ 
   UNREFERENCED_PARAMETER(nFormatsCount); 
   UNREFERENCED_PARAMETER(nTransferMode); 
   UNREFERENCED_PARAMETER(pFormat); 
 
   // You can do here any kind of checking or handling to the received format. 
 
   return WIA_SUCCESS; 
} 
 
L_INT LWIA__EnumFormatsExample() 
{ 
   CMyWIA MyClass; 
   IWiaItem * pRootItem = NULL; 
   L_INT nRet; 
 
   /* Get a pointer to the WIA device's root items */ 
   nRet = MyClass.GetRootItem(NULL, (L_VOID**)&pRootItem); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = MyClass.EnumFormats(pRootItem, 0); 
   if (nRet != WIA_SUCCESS) 
      return FALSE;  
 
   return SUCCESS; 
} 
Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C++ Class Library Help