Partager via


IVsSccEnlistmentPathTranslation.TranslateProjectPathToEnlistmentPath Method

Translates a possibly virtual project path to a local path and an enlistment physical path.

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

Syntax

'Declaration
Function TranslateProjectPathToEnlistmentPath ( _
    lpszProjectPath As String, _
    <OutAttribute> ByRef pbstrEnlistmentPath As String, _
    <OutAttribute> ByRef pbstrEnlistmentPathUNC As String _
) As Integer
int TranslateProjectPathToEnlistmentPath(
    string lpszProjectPath,
    out string pbstrEnlistmentPath,
    out string pbstrEnlistmentPathUNC
)
int TranslateProjectPathToEnlistmentPath(
    [InAttribute] String^ lpszProjectPath, 
    [OutAttribute] String^% pbstrEnlistmentPath, 
    [OutAttribute] String^% pbstrEnlistmentPathUNC
)
abstract TranslateProjectPathToEnlistmentPath : 
        lpszProjectPath:string * 
        pbstrEnlistmentPath:string byref * 
        pbstrEnlistmentPathUNC:string byref -> int
function TranslateProjectPathToEnlistmentPath(
    lpszProjectPath : String, 
    pbstrEnlistmentPath : String, 
    pbstrEnlistmentPathUNC : String
) : int

Parameters

  • lpszProjectPath
    Type: String

    [in] The project's (possibly) virtual path as obtained from the solution file.

  • pbstrEnlistmentPath
    Type: String%

    [out] The local path used by the solution for loading and saving the project.

  • pbstrEnlistmentPathUNC
    Type: String%

    [out] The path used by the source control system for managing the enlistment ("\\drive\path", "[drive]:\path", "file://server/path").

Return Value

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

Remarks

COM Signature

From ivssccenlistmentpathtranslation.idl

HRESULT TranslateProjectPathToEnlistmentPath(
   [in] LPCOLESTR lpszProjectPath,
   [out] BSTR * pbstrEnlistmentPath,
   [out] BSTR * pbstrEnlistmentPathUNC
);

To go from an enlistment path to a project path, use the TranslateEnlistmentPathToProjectPath method.

.NET Framework Security

See Also

Reference

IVsSccEnlistmentPathTranslation Interface

Microsoft.VisualStudio.Shell.Interop Namespace