IVsSccProjectProviderBinding::TranslateEnlistmentPath Method (String^, Int32, String^)
Translates an enlistment path into a displayable path.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
int TranslateEnlistmentPath( String^ lpszPath, [OutAttribute] int% pfAlternateIsDisplay, [OutAttribute] String^% pbstrAlternatePath )
Parameters
- lpszPath
-
Type:
System::String^
[in] The enlistment path (a local path) to be translated.
- pfAlternateIsDisplay
-
Type:
System::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
-
Type:
System::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.
Return Value
Type: System::Int32If 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.
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.