Share via


IVSSItem.AddWithEncoding Method 

Adds a file with encoding to a project.

Namespace: Microsoft.VisualStudio.SourceSafe.Interop
Assembly: Microsoft.VisualStudio.SourceSafe.Interop (in microsoft.visualstudio.sourcesafe.interop.dll)

Syntax

'Declaration
Function AddWithEncoding ( _
    <InAttribute> Local As String, _
    <InAttribute> ItemEncoding As VSSItemEncoding, _
    <InAttribute> <OptionalAttribute> Optional Comment As String = "", _
    <InAttribute> <OptionalAttribute> Optional iFlags As Integer = 0 _
) As VSSItem
'Usage
Dim instance As IVSSItem
Dim Local As String
Dim ItemEncoding As VSSItemEncoding
Dim Comment As String
Dim iFlags As Integer
Dim returnValue As VSSItem

returnValue = instance.AddWithEncoding(Local, ItemEncoding, Comment, iFlags)
VSSItem AddWithEncoding (
    [InAttribute] string Local,
    [InAttribute] VSSItemEncoding ItemEncoding,
    [OptionalAttribute] [InAttribute] string Comment,
    [OptionalAttribute] [InAttribute] int iFlags
)
VSSItem^ AddWithEncoding (
    [InAttribute] String^ Local, 
    [InAttribute] VSSItemEncoding ItemEncoding, 
    [InAttribute] [OptionalAttribute] String^ Comment, 
    [InAttribute] [OptionalAttribute] int iFlags
)
VSSItem AddWithEncoding (
    /** @attribute InAttribute() */ String Local, 
    /** @attribute InAttribute() */ VSSItemEncoding ItemEncoding, 
    /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ String Comment, 
    /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ int iFlags
)
function AddWithEncoding (
    Local : String, 
    ItemEncoding : VSSItemEncoding, 
    Comment : String, 
    iFlags : int
) : VSSItem

Parameters

  • Local
    A string representing a fully qualified local path of a file with encoding to be added to the project.
  • Comment
    Optional. A string containing a comment. The default is an empty string.
  • iFlags
    Optional. The default value is 0.

    For more inforamtion, see VSSFlags.

Return Value

A reference of the IVSSItem type to an object that represents a file with encoding added to the project.

Remarks

[IDL]

HRESULT AddWithEncoding

(

[in] BSTR Local,

[in] VSSItemEncoding ItemEncoding,

[in, defaultvalue("")] BSTR Comment,

[in, defaultvalue(0)] long iFlags,

[out, retval] IVSSItem **ppIItem

);

The AddWithEncoding method applies to project objects only. If you attempt to call the Add method against a file object or add a file that already exists in the project, a run-time error is generated.

See Also

Reference

IVSSItem Interface
IVSSItem Members
Microsoft.VisualStudio.SourceSafe.Interop Namespace