IVsPathVariableResolver.EncodePath Method

Encodes a file path by replacing the installation directory and the user application data directory with the strings %VS_INSTALL_DIRECTORY% and %USER_APPDATA% respectively.

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

Syntax

'宣言
Function EncodePath ( _
    strPath As String, _
    dwFlags As UInteger, _
    <OutAttribute> ByRef pbstrEncodedPath As String _
) As Integer
'使用
Dim instance As IVsPathVariableResolver
Dim strPath As String
Dim dwFlags As UInteger
Dim pbstrEncodedPath As String
Dim returnValue As Integer

returnValue = instance.EncodePath(strPath, _
    dwFlags, pbstrEncodedPath)
int EncodePath(
    string strPath,
    uint dwFlags,
    out string pbstrEncodedPath
)
int EncodePath(
    [InAttribute] String^ strPath, 
    [InAttribute] unsigned int dwFlags, 
    [OutAttribute] String^% pbstrEncodedPath
)
function EncodePath(
    strPath : String, 
    dwFlags : uint, 
    pbstrEncodedPath : String
) : int

Parameters

  • strPath
    Type: System.String

    [in] String containing the path to encode.

  • pbstrEncodedPath
    Type: System.String%

    [out] A pointer to a string containing the encoded path.

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 vsshell80.idl:

HRESULT IVsPathVariableResolver::EncodePath(
   [in] LPCOLESTR strPath, 
   [in] VSPROFILEPATHRESOLVERFLAGS dwFlags, 
   [out] BSTR *pbstrEncodedPath
);

Permissions

See Also

Reference

IVsPathVariableResolver Interface

IVsPathVariableResolver Members

Microsoft.VisualStudio.Shell.Interop Namespace