VersionHistory Method
The VersionHistory method gets the version history for the document.
Function VersionHistory( _varUrlsAs Variant, _
[flagsAs Long] _)As _Recordset[C++]
HRESULT VersionHistory(
VARIANTvarUrls,
LONGflags,
_Recordset**ppVersionHistory);
[Visual Basic]
Parameters
- varUrls
Variant that contains an array of Variants. Each Variant in the array contains a String that contains the URL of a document. Only one document can be specified. - flags
Long that contains a bit mask that indicates whether the version history returns information for only the latest version. If the value of the flags parameter is 1, the VersionHistory method returns information for only the latest version. If the value of the flags parameter is set to the default of 0, all version records are returned. See EnumKnowledge_VersionHistoryFlags for possible values. The flags parameter also contains the bit mask that indicates whether to use ServerXMLHTTP or WININET to send the request. See EnumKnowledge_VersioningFlags for possible values.
Return Values
This method returns an ActiveX Data Objects (ADO) recordset that contains the version status information for each version of the document. All recordsets returned by PKMCDO have RecordCount equal to -1. Instead of relying on the count, call MoveNext in a loop that checks for Recordset.EOF. The records that are returned contain fields in addition to the fields specific to the content class of the item. For more information about the properties returned, see SharePoint Portal Server Global Properties. For information about the format of the returned recordset, see Recordset Format.
Error Values
If an error is raised, Err.Number is set to one of the values documented on the Error Messages page.
[C++]
Parameters
varUrls
[in] VARIANT that contains an array of VARIANTs. Each VARIANT in the array contains a BSTR that contains the Uniform Resource Locator (URL) of a document. Only one document can be specified.flags
LONG that contains a bit mask that indicates whether the version history returns information for only the latest version. If the value of the flags parameter is 1, the VersionHistory method returns information for only the latest version. If the value of the flags parameter is set to the default of 0, all version records are returned. See EnumKnowledge_VersionHistoryFlags for possible values. The flags parameter also contains the bit mask that indicates whether to use ServerXMLHTTP or WININET to send the request. See EnumKnowledge_VersioningFlags for possible values.ppVersionHistory
[out, retval] Address of a pointer to an ActiveX Data Objects (ADO) recordset that contains the version status information for each version of the document. This parameter is read-only. Rows cannot be deleted or added. All recordsets returned by PKMCDO have RecordCount equal to -1. Instead of relying on the count, call MoveNext in a loop that checks for Recordset.EOF.
The records that are returned contain fields in addition to the fields specific to the content class of the item. For more information about the properties returned, see SharePoint Portal Server Global Properties.For information about the format of the returned recordset, see Recordset Format.
Return Values
For a list of error messages returned by SharePoint Portal Server, see Error Messages.