다음을 통해 공유


IVsSccManager2.RegisterSccProject Method

Definition

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

public:
 int RegisterSccProject(Microsoft::VisualStudio::Shell::Interop::IVsSccProject2 ^ pscp2Project, System::String ^ pszSccProjectName, System::String ^ pszSccAuxPath, System::String ^ pszSccLocalPath, System::String ^ pszProvider);
public:
 int RegisterSccProject(Microsoft::VisualStudio::Shell::Interop::IVsSccProject2 ^ pscp2Project, Platform::String ^ pszSccProjectName, Platform::String ^ pszSccAuxPath, Platform::String ^ pszSccLocalPath, Platform::String ^ pszProvider);
int RegisterSccProject(Microsoft::VisualStudio::Shell::Interop::IVsSccProject2 const & pscp2Project, std::wstring const & pszSccProjectName, std::wstring const & pszSccAuxPath, std::wstring const & pszSccLocalPath, std::wstring const & pszProvider);
public int RegisterSccProject (Microsoft.VisualStudio.Shell.Interop.IVsSccProject2 pscp2Project, string pszSccProjectName, string pszSccAuxPath, string pszSccLocalPath, string pszProvider);
abstract member RegisterSccProject : Microsoft.VisualStudio.Shell.Interop.IVsSccProject2 * string * string * string * string -> int
Public Function RegisterSccProject (pscp2Project As IVsSccProject2, pszSccProjectName As String, pszSccAuxPath As String, pszSccLocalPath As String, pszProvider As String) As Integer

Parameters

pscp2Project
IVsSccProject2

[in] Pointer to the project's IVsSccProject2 interface. This interface must be on the same object that supports IVsProject3 and IVsHierarchy.

pszSccProjectName
String

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

pszSccAuxPath
String

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

pszSccLocalPath
String

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

pszProvider
String

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

Returns

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.

Applies to