IVsPathVariableResolver.EncodePath(String, UInt32, String) 方法

定义

通过将安装目录和用户应用程序数据目录替换为字符串% VS_INSTALL_DIRECTORY% 和% USER_APPDATA%,对文件路径进行编码。

public:
 int EncodePath(System::String ^ strPath, System::UInt32 dwFlags, [Runtime::InteropServices::Out] System::String ^ % pbstrEncodedPath);
int EncodePath(std::wstring const & strPath, unsigned int dwFlags, [Runtime::InteropServices::Out] std::wstring const & & pbstrEncodedPath);
public int EncodePath (string strPath, uint dwFlags, out string pbstrEncodedPath);
abstract member EncodePath : string * uint32 * string -> int
Public Function EncodePath (strPath As String, dwFlags As UInteger, ByRef pbstrEncodedPath As String) As Integer

参数

strPath
String

中包含要编码的路径的字符串。

dwFlags
UInt32

中编码选项标志。 __VSPROFILEPATHRESOLVERFLAGS 枚举中的一个值。

pbstrEncodedPath
String

弄指向包含编码路径的字符串的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell80:

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

适用于