IContentListFactory::CreateNewContentList Method [C++]

Use this method to create a new ContentList object based on the schema established for this ContentListFactory object. The new ContentList object provides a unified interface to the private data that it stores and to the shared data stored in the ContentListFactory object (that created it).

Definition

[C++]

HRESULT IContentListFactory::CreateNewContentList(IContentList**NewList);

[Visual Basic]

Function CreateNewContentList() As ContentList

Parameters

  • NewList[C++]
    [out, retval] The address of a pointer used to return the new ContentList object.

[Visual Basic] None.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] If this method completes successfully, it returns a reference to the new ContentList object.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The new ContentList object will be based on the established schema for this ContentListFactory object. Storage for columns marked as CLCOL_PRIVATE in the schema is allocated in the ContentList object. The ContentList object maintains a pointer back to the factory that created it, which is where the storage for "shared" columns is maintained.

A ContentList object cannot exist independently of a ContentListFactory object.

The only prerequisite for calling this method is that a schema has been established. This can be accomplished by setting the Schema property or by calling the ConstructFromRecordset method.

Example

[Visual Basic]

set oMyContentList = myContentListFactory.CreateNewContentList()

See Also

[C++]ContentListFactory Object

[Visual Basic]ContentListFactory Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.