IEnumWiaItem2::Next method
Fills an array of pointers to IWiaItem2 interfaces.
Syntax
HRESULT Next(
[in] ULONG cElt,
[out] IWiaItem2 **ppIWiaItem2,
[in, out] ULONG *pcEltFetched
);
Parameters
-
cElt [in]
-
Type: ULONG
Specifies the number of array elements in the array indicated by the ppIWiaItem2 parameter.
-
ppIWiaItem2 [out]
-
Type: IWiaItem2**
Receives the address of an array of IWiaItem2 interface pointers. IEnumWiaItem2::Next fills this array with interface pointers.
-
pcEltFetched [in, out]
-
Type: ULONG*
On output, this parameter receives the number of interface pointers actually stored in the array indicated by the ppIWiaItem2 parameter. When the enumeration is complete, this parameter contains zero.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The Windows Image Acquisition (WIA) 2.0 run-time system represents WIA 2.0 hardware devices as a hierarchical tree of IWiaItem2 objects. Applications use the IEnumWiaItem2::Next method to obtain an IWiaItem2 interface pointer for each item in the current folder of a hardware device's IWiaItem2 object tree.
To obtain the list of pointers, the application passes an array of IWiaItem2 interface pointers that it allocates. It also passes the number of array elements in the parameter cElt. The IEnumWiaItem2::Next method fills the array with pointers to IWiaItem2 interfaces.
Until the enumeration process completes, the IEnumWiaItem2::Next method returns S_OK. Each time it does, it sets the value pointed to by pcEltFetched to the number of items it inserted into the array. When IEnumWiaItem2::Next finishes the process of enumerating IWiaItem2 objects, it returns S_FALSE and sets the memory location pointed to by pcEltFetched to zero.
Applications must call the IUnknown::Release method on the interface pointers they receive through the ppIWiaItem2 parameter.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|
IDL |
|