IVsSccProject2.SetSccLocation Method
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.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function SetSccLocation ( _
pszSccProjectName As String, _
pszSccAuxPath As String, _
pszSccLocalPath As String, _
pszSccProvider As String _
) As Integer
int SetSccLocation(
string pszSccProjectName,
string pszSccAuxPath,
string pszSccLocalPath,
string pszSccProvider
)
int SetSccLocation(
[InAttribute] String^ pszSccProjectName,
[InAttribute] String^ pszSccAuxPath,
[InAttribute] String^ pszSccLocalPath,
[InAttribute] String^ pszSccProvider
)
abstract SetSccLocation :
pszSccProjectName:string *
pszSccAuxPath:string *
pszSccLocalPath:string *
pszSccProvider:string -> int
function SetSccLocation(
pszSccProjectName : String,
pszSccAuxPath : String,
pszSccLocalPath : String,
pszSccProvider : String
) : int
Parameters
- pszSccProjectName
Type: System.String
[in] String, opaque to the project, that identifies the project location on the server. Persist this string in the project file.
- pszSccAuxPath
Type: System.String
[in] String, opaque to the project, that identifies the path to the server. Persist this string in the project file.
- pszSccLocalPath
Type: System.String
[in] String, opaque to the project, that identifies the local path to the project. Persist this string in the project file.
- pszSccProvider
Type: System.String
[in] String, opaque to the project, that identifies the source control package. Persist this string in the project file.
Return Value
Type: System.Int32
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 nulla null reference (Nothing in Visual Basic) or empty strings are returned for all four parameters, the project does not need to store source control settings and should not call RegisterSccProject.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.