Compartilhar via


IVsSccProject2.SetSccLocation(String, String, String, String) Method

Definition

This method is called by the source control portion of the environment when a project is initially added to source control, or to change some of the project's settings.

public:
 int SetSccLocation(System::String ^ pszSccProjectName, System::String ^ pszSccAuxPath, System::String ^ pszSccLocalPath, System::String ^ pszSccProvider);
public:
 int SetSccLocation(Platform::String ^ pszSccProjectName, Platform::String ^ pszSccAuxPath, Platform::String ^ pszSccLocalPath, Platform::String ^ pszSccProvider);
int SetSccLocation(std::wstring const & pszSccProjectName, std::wstring const & pszSccAuxPath, std::wstring const & pszSccLocalPath, std::wstring const & pszSccProvider);
public int SetSccLocation (string pszSccProjectName, string pszSccAuxPath, string pszSccLocalPath, string pszSccProvider);
abstract member SetSccLocation : string * string * string * string -> int
Public Function SetSccLocation (pszSccProjectName As String, pszSccAuxPath As String, pszSccLocalPath As String, pszSccProvider As String) As Integer

Parameters

pszSccProjectName
String

[in] String, opaque to the project, that identifies the project location on the server. Persist this string in the project file.

pszSccAuxPath
String

[in] String, opaque to the project, that identifies the path to the server. Persist this string in the project file.

pszSccLocalPath
String

[in] String, opaque to the project, that identifies the local path to the project. Persist this string in the project file.

pszSccProvider
String

[in] String, opaque to the project, that identifies the source control package. Persist this string in the project file.

Returns

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

Remarks

COM Signature

From ivssccproject2.idl

HRESULT SetSccLocation(  
   [in] LPCOLESTR pszSccProjectName,  
   [in] LPCOLESTR pszSccAuxPath,  
   [in] LPCOLESTR pszSccLocalPath,  
   [in] LPCOLESTR pszSccProvider  
);  

IVsSccProject2::SetSccLocation is called by the environment to inform the project of its source control settings. This information is used to identify the source control package for the project, and map between the source control server and disk location of the project and related tasks.

The project must remember the four pieces of data (project name, auxiliary path, local path, and source control package) that are specified by persisting them in its project file. When these strings are passed to the project, the project must call QueryEditFiles to determine whether it can change its state, and accept the strings and store them.

When it is opened, the project calls RegisterSccProject to register itself with the source control portion of the environment.

Note

If null orempty strings are returned for all four parameters, the project does not need to store source control settings and should not call RegisterSccProject.

Applies to