Partager via


IVsSccProjectProviderBinding.TranslateEnlistmentPath Method

Definition

Translates an enlistment path into a displayable path.

public:
 int TranslateEnlistmentPath(System::String ^ lpszPath, [Runtime::InteropServices::Out] int % pfAlternateIsDisplay, [Runtime::InteropServices::Out] System::String ^ % pbstrAlternatePath);
int TranslateEnlistmentPath(std::wstring const & lpszPath, [Runtime::InteropServices::Out] int & pfAlternateIsDisplay, [Runtime::InteropServices::Out] std::wstring const & & pbstrAlternatePath);
public int TranslateEnlistmentPath (string lpszPath, out int pfAlternateIsDisplay, out string pbstrAlternatePath);
abstract member TranslateEnlistmentPath : string * int * string -> int
Public Function TranslateEnlistmentPath (lpszPath As String, ByRef pfAlternateIsDisplay As Integer, ByRef pbstrAlternatePath As String) As Integer

Parameters

lpszPath
String

[in] The enlistment path (a local path) to be translated.

pfAlternateIsDisplay
Int32

[out] Returns true (nonzero) if the alternate path is the preferred path for display; otherwise, returns false (0) if the path supplied as lpszPath is preferred for display.

pbstrAlternatePath
String

[out] Returns an alternate path that can be used for display if pfAlternatedIsDisplay is true. Note   The alternate path should never be empty: if an alternate path is not needed, then this method should return the original path as the alternate path.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code. A typical error can be E_NOTIMPL if the project does not use dual paths.

Remarks

COM Signature

From ivssccprojectproviderbinding.idl

HRESULT TranslateEnlistmentPath(  
   [in] LPCOLESTR lpszPath,  
   [out] BOOL * pfAlternateIsDisplay,  
   [out] BSTR * pbstrAlternatePath  
);  

The enlistment path might be in one or two forms, depending on the needs of the project.

Projects are allowed to have two different but synonymous paths: local and cache. The project's Version API (VAPI) source control package must treat both paths as identical (as Visual Studio may pass in either one). TranslateEnlistmentPath handles this translation for the source control package.

Applies to