online source control
back to content
sign up free version control plan

ISAWHAppObject::GetChangeSetIdInfo

Description

Retrieves information of all files or projects that are modified as part of the same change set as the selected item.

Syntax

long GetChangeSetIdInfo(
        long ItemIdLow,
        long ItemIdHigh,
        long ChangeSetIdLow,
        long ChangeSetIdHigh,
      ISAWHChangeSetIdInfoSet* ChangeSetIdInfoSet,
      VARIANT_BOOL* Cancelled,
      BSTR* ResultDescription

);

Parameters

ItemIdLow
[in] Specifies the 32-bit item ID.

ItemIdHigh
[in] Specifies the 64-bit item ID.

Note: ItemIdLow and ItemIdHigh form a single 64-bit item ID.

ChangeSetIdLow
[in] Specifies the low-order 32 bits of the change set ID.

ChangeSetIdHigh
[in] Specifies the high-order 32 bits of the change set ID.

Note: ChangeSetIdLow and ChangeSetIdHigh form a single 64-bit change set ID.

ChangeSetIdInfoSet
[out] Specifies the information of the items whose modifications are part of the change set.

Cancelled
[out] If the method fails, returns whether the operation is cancelled.

ResultDescription
[out] Returns the description of the return value. If the method succeeds, returns 'Completed'. If the method fails, returns the description of the error.

Return Value

If the method succeeds, returns 0. If the method fails, returns other error codes.

See Also

Sample

VB Sample:

Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject

Set sdkObject = New SAWHSDKLib.SAWHAppObject

Private Sub GetChangeSetIdInfo_Click()

	Dim Cancelled As Boolean
	Dim ResultDescription As String
	Dim ChangeSetIdLow As Long
	Dim ChangeSetIdInfoSet As New SAWHChangeSetIdInfoSet
	Dim FileName As String

	FileName = "$/FileName.txt"

	'At first Should get the file history.
	Dim FileHistoryParam As New SAWHFileHistoryParam
	Dim IsPinned As Boolean
	Dim HistorySet As New SAWHHistorySet
	Dim ResultValue As Long
	ResultValue = sdkObject.GetFileHistory(FileName, FileHistoryParam, IsPinned, HistorySet, Cancelled, ResultDescription)
	If ResultValue <> 0 Then
		MsgBox "Failed to get the file history."
		Exit Sub
	End If
	Dim History As New SAWHHistory
	HistorySet.Get 0, History
	ResultValue = sdkObject.GetChangeSetIdInfo(History.ItemIdLow, History.ItemIdHigh, History.ChangeSetIdLow, History.ChangeSetIdHigh, ChangeSetIdInfoSet, Cancelled, ResultDescription)

	If ResultValue <> 0 Then
		MsgBox ("Failed to get the changeset id info.")
	End If

	Dim Count As Long
	Count = ChangeSetIdInfoSet.GetCount
	Dim Index As Long
	For Index = 0 To Count - 1

		Dim ChangeSetIdInfo As New SAWHChangeSetIdInfo
		ChangeSetIdInfoSet.Get Index, ChangeSetIdInfo

		Dim ActionDateTime As Date
		ActionDateTime = ChangeSetIdInfo.ActionDateTime

		Dim ActionType As Enum_ActionType
		ActionType = ChangeSetIdInfo.ActionType

		Dim ActionDescription As String
		ActionDescription = ChangeSetIdInfo.ActionDescription

		Dim Comment As String
		Comment = ChangeSetIdInfo.Comment

		Dim ItemName As String
		ItemName = ChangeSetIdInfo.ItemName

		Dim ItemIdLow As Long
		ItemIdLow = ChangeSetIdInfo.ItemIdLow

		Dim ItemIdHigh As Long
		ItemIdHigh = ChangeSetIdInfo.ItemIdHigh

		Dim ItemVersionLow As Long
		ItemVersionLow = ChangeSetIdInfo.ItemVersionLow

		Dim ItemVersionHigh As Long
		ItemVersionHigh = ChangeSetIdInfo.ItemVersionHigh

		Dim LabelName As String
		LabelName = ChangeSetIdInfo.LabelName

		Dim UserName As String
		UserName = ChangeSetIdInfo.UserName

	Next

End Sub