Purpose
Places the IA4HierarchyFolder instance in an activated state. This function also performs any processing that is needed to prepare a folder for enumeration, including calling the iSeries™ server to prime the cache of folder objects on the client. The function is called from a data thread so that long running operations will not degrade the performance of the user interface. This is a required member function.
Syntax
HRESULT STDMETHODCALLTYPE Activate();
Parameters
None.
Return Codes
Returns NOERROR if successful or E_FAIL if unable to obtain the contents of the folder.
Comments
The iSeries Navigator calls this function the first time a user selects or expands a folder. It is called again, after a call to Close, when the user has requested a refresh of the folder contents.
The function may be called at other times whenever a pointer to the folder interface needs to be reestablished. An example would be when the user selects a folder a second time. After selecting another folder, the function should simply return TRUE if the associated processing has already been performed.
For extremely large lists, you may choose to return from Activate before the list is completely constructed, after having first created a worker thread to continue building the list. If this is the case, make sure that your implementation of GetListSize returns the correct indication of whether the list is completely constructed.