GetNextObject Method  
 
BOOL GetNextObject(
  LPWEB_STORAGE_OBJECT lpObject  
);

The GetNextObject method returns information about the next storage object that matches the specified label or content type.

Parameters

lpObject
A pointer to a WEB_STORAGE_OBJECT structure that will contain information about the storage object when the function returns. This parameter cannot be NULL.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The GetNextObject method returns information about the next object that matches the label and/or content type that was specified by the GetFirstObject method. This method may only be called after GetFirstObject has been called, otherwise it will fail.

When all matching objects have been returned to the caller, this method will return zero (FALSE) and the GetLastError method will return NO_ERROR. Any other error code indicates an underlying problem with the request, such as an invalid parameter passed to the function.

You cannot intermix calls between GetNextObject and EnumObjects. The EnumObjects method will reset the internal object cache for the client session and subsequent calls to GetNextObject will fail.

Example

WEB_STORAGE_OBJECT webObject;

if (pStorage->GetFirstObject(&webObject))
{
    do
    {
        // Print information about each object
        _tprintf(_T("Object: %s\n"), webObject.szObjectId);
        _tprintf(_T("Label: %s\n"), webObject.szLabel);
        _tprintf(_T("Size: %lu\n"), webObject.dwObjectSize);
        _tprintf(_T("Digest: %s\n"), webObject.szDigest);
        _tprintf(_T("Content: %s\n"), webObject.szContent);
        _tprintf(_T("\n"));
    }
    while (pStorage->GetNextObject(&webObject));
}

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cswebv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also