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

ISAWHAppObject::DeleteProject

Description

Deletes a project.

Syntax

long DeleteProject(
        ISAWHDeleteProjectSet* DeleteProject,
       
VARIANT_BOOL DestoryPermanently,
       
VARIANT_BOOL* Cancelled,
        BSTR* ResultDescription,
        ISAWHOperationResultSet* OperationResultSet
);

Parameters

DeleteProject
[in] Specifies the full name set of the projects to be deleted.

DestoryPermanently
[in] Specifies whether to destroy the project permanently.

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

ResultDescription
[out] Returns the description of the result. If the operation succeeds, returns 'Completed'. If the operation fails, returns the error information.

OperationResultSet
[out] Returns the result information set of the operation.

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 DeleteProject_Click()

	Dim Cancelled As Boolean
	Dim ResultDescription As String
	Dim DeleteProjectSet As New SAWHDeleteProjectSet
	Dim OperationResultSet As New SAWHOperationResultSet

	DeleteProjectSet.Add "$/ProjectName"

	Dim ResultValue As Long
	ResultValue = sdkObject.DeleteProject(DeleteProjectSet, True, Cancelled, ResultDescription, OperationResultSet)

	If ResultValue <> 0 Then
		MsgBox "Failed to delete the project."
	End If

End Sub