ISAWHAppObject::CheckoutProject
Description
Checks out a project.
Syntax
long CheckoutProject(
BSTR ProjectToCheckout,
BSTR LocalDirectory,
BSTR Comment,
VARIANT_BOOL
ExclusivelyCheckout,
VARIANT_BOOL
DoNotGetLocalCopy,
VARIANT_BOOL Recursive,
Enum_ModifiedFileHandling
ModifiedFileHandling,
Enum_EOL EOL,
Enum_CompareFileBy
CompareFileBy,
Enum_SetLocalFileTime SetLocalFileTime,
ISAWHDiffMergeParam*
MergeParam,
VARIANT_BOOL* Cancelled,
BSTR* ResultDescription,
ISAWHOperationResultSet* OperationResultSet
);
Parameters
ProjectToCheckout
[in] Specifies the full name of the project to be checked out.
LocalDirectory
[in] Specifies the path of the local directory to which the project is
checked out.
Comment
[in] Specifies the comments for the Check Out operation.
ExclusivelyCheckout
[in] Specifies
whether to request exclusive checkout of the project.
DoNotGetLocalCopy
[in] Specifies whether to
copy the project to the local working folder when it is checked out.
Recursive
[in] Specifies whether the folder is to be checked out recursively.
ModifiedFileHandling
[in] Specifies how to handle the local file if a writable copy of the file
exists in the local folder..
EOL
[in] Specifies which end-of-line terminator is to be used for files.
CompareFileBy
[in] Specifies how to determine if the local copy is up-to-date, by checksum or by date/time.
SetLocalFileTime
[in] Specifies the type of time to be assigned to the local file.
MergeParam
[in] Specifies the parameters used for merge.
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 CheckoutProject_Click() Dim Cancelled As Boolean Dim ResultDescription As String Dim ProjectToCheckout As String Dim LocalDirectory As String Dim Comment As String Dim OperationResultSet As New SAWHOperationResultSet Dim MergeParam As New SAWHDiffMergeParam ProjectToCheckout = "$/ProjectName" LocalDirectory = "D:\ProjectToCheckout" Comment = "Check out project" Dim ResultValue As Long ResultValue = sdkObject.CheckoutProject(ProjectToCheckout, LocalDirectory, Comment, False, False, False, Enum_AskModifiedFile, Enum_EOLNative, Enum_CompareFileByChecksum, Enum_SetLocalFileTimeCurrent, MergeParam, Cancelled, ResultDescription, OperationResultSet) If ResultValue <> 0 Then MsgBox "Failed to check out project." End If End Sub |