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

ISAWHAppObject::SetFileType

Description

Sets the type of the file, mergeable or binary.

Syntax

long SetFileType(
       BSTR
FileName,
       VARIANT_BOOL IsMergeable,
       VARIANT_BOOL* Cancelled,
       BSTR* ResultDescription
);

Parameters

FileName
[in] Specifies the full name of the file.

IsMergeable
[in] Specifies whether the file is mergeable.

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.

Sample

VB Sample:

Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject

Set sdkObject = New SAWHSDKLib.SAWHAppObject

Private Sub SetFileType_Click()

	Dim Cancelled As Boolean
	Dim ResultDescription As String
	Dim FileName As String

	FileName = "$/FileName.txt"

	Dim ResultValue As Long

	ResultValue = sdkObject.SetFileType(FileName, False, Cancelled, ResultDescription)
	If ResultValue <> 0 Then
		MsgBox "Failed to set the file type."
	End If

End Sub