Share via


IContentListSchema::SetSchema Method

Use this method to write an entire schema to a ContentListSchema object.

This is one of the two ContentListSchema methods that, in the interest of high performance, do not support a scriptable interface. The other method is GetSchema. They are only intended for use in C++.

In the interest of high performance, this method is not intended for use from Microsoft Visual Basic or Microsoft Visual Basic Scripting Edition (VBScript).

HRESULT IContentListSchema::SetSchema(
  long nCols,
  CLCOL_DESCRIPTOR* rgColDesc
);

Parameters

  • nCols
    [C++]

    [in] A long that specifies the number of columns in the column descriptor array passed in the rgColDesc parameter.

  • rgColDesc
    [C++]

    [in,size_is(nCols)] A pointer to an array of CLCOL_DESCRIPTOR structures. These structures represent the entire schema, where each element in the array contains information regarding the column in that same position in the schema. For more information about the column descriptor structure, see ContentListSchema Object.

Return Value

[C++]

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

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.

See Also

Other Resources

ContentListSchema Object