IVsSccManager2.RegisterSccProject Method

This method is called by projects that are under source control when they are first opened to register project settings.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function RegisterSccProject ( _
    pscp2Project As IVsSccProject2, _
    pszSccProjectName As String, _
    pszSccAuxPath As String, _
    pszSccLocalPath As String, _
    pszProvider As String _
) As Integer
int RegisterSccProject(
    IVsSccProject2 pscp2Project,
    string pszSccProjectName,
    string pszSccAuxPath,
    string pszSccLocalPath,
    string pszProvider
)
int RegisterSccProject(
    [InAttribute] IVsSccProject2^ pscp2Project, 
    [InAttribute] String^ pszSccProjectName, 
    [InAttribute] String^ pszSccAuxPath, 
    [InAttribute] String^ pszSccLocalPath, 
    [InAttribute] String^ pszProvider
)
abstract RegisterSccProject : 
        pscp2Project:IVsSccProject2 * 
        pszSccProjectName:string * 
        pszSccAuxPath:string * 
        pszSccLocalPath:string * 
        pszProvider:string -> int
function RegisterSccProject(
    pscp2Project : IVsSccProject2, 
    pszSccProjectName : String, 
    pszSccAuxPath : String, 
    pszSccLocalPath : String, 
    pszProvider : String
) : int

Parameters

  • pszSccProjectName
    Type: String

    [in] A string that identifies the project location on the server.

  • pszSccAuxPath
    Type: String

    [in] A string that identifies the path to the server.

  • pszSccLocalPath
    Type: String

    [in] A string that identifies the local path to the project.

  • pszProvider
    Type: String

    [in] A string that identifies the source control package.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From ivssccmanager2.idl

HRESULT RegisterSccProject(
   [in] IVsSccProject2 *pscp2Project,
   [in] LPCOLESTR pszSccProjectName,
   [in] LPCOLESTR pszSccAuxPath,
   [in] LPCOLESTR pszSccLocalPath,
   [in] LPCOLESTR pszProvider
);

Project implementers: you can determine whether your project is under source control by checking if the source control strings provided in the pszSccProjectName, pszSccAuxPath, pszSccLocalPath, and pszProvider parameters are persisted in your project. If these strings are not present (or are blank or null), do not call this method. If these strings are present, then they were provided to the project through SetSccLocation before the project was last closed. When the project is next opened, pass these strings back to the Source Control Stub (the part of Visual Studio that manages source control packages) using its implementation of RegisterSccProject. The Source Control Stub will load the appropriate source control package and forward the strings by calling that package's implementation of this method.

Note Projects treat the strings as opaque and do not attempt to parse them. Projects look at the strings only to determine if they are empty or not.

.NET Framework Security

See Also

Reference

IVsSccManager2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace