Purpose
Returns the total count of objects contained in a particular folder in the iSeries™ Navigator hierarchy. This is a required member function.
Syntax
HRESULT STDMETHODCALLTYPE GetItemCount( ULONG* pCount );
Parameters
Return Codes
Returns A4HYF_OK_LISTCOMPLETE if the list is completely built and the total count of items is known. Returns A4HYF_OK_LISTNOTCOMPLETE if the list is still being constructed; in this situation the item count represents the count of items in the partially constructed list. Returns A4HYF_E_LISTDATAERROR if an error is encountered while constructing the list. In this situation the item count represents only the items that are already cached on the client.
Comments
Following a successful return from Activate, Navigator calls this function to obtain the count of objects for the folder that is about to be populated. Following the call to this function, Navigator repeatedly calls ItemAt to obtain the item identifiers for the objects in the folder.
For extremely large lists, you may choose to return from Activate before the entire list has been cached on the client. If this is the case, you should return A4HYF_OK_LISTNOTCOMPLETE from GetItemCount. From that point on, GetItemCount will be called by the iSeries Navigator every 10 seconds until A4HYF_OK_LISTCOMPLETE or A4HYF_E_LISTDATAERROR is returned.