IVsWebFavorites.AddFavorite 方法

收藏夹 列表。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function AddFavorite ( _
    lpszURL As String, _
    lpszName As String, _
    pszIconFileName As String, _
    iIconIndex As Integer, _
    <OutAttribute> pbstrFilename As String() _
) As Integer
int AddFavorite(
    string lpszURL,
    string lpszName,
    string pszIconFileName,
    int iIconIndex,
    string[] pbstrFilename
)

参数

  • lpszURL
    类型:System.String
    [in] 对包含 URL 的字符串的指针添加。
  • lpszName
    类型:System.String
    [in] 对包含默认显示名称的字符串的指针。
  • pszIconFileName
    类型:System.String
    [in] 字符串包含的指针包含该图标的文件的名称在 URL 旁显示。可以为 nullnull 引用(在 Visual Basic 中为 Nothing)。
  • iIconIndex
    类型:System.Int32
    [in] 整数。图标的索引在 pszIconFileName给定的文件中。
  • pbstrFilename
    类型:array<System.String[]
    [out] 对包含快捷方式的文件的指针收藏夹。可以为 nullnull 引用(在 Visual Basic 中为 Nothing)。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsbrowse.idl:

HRESULT IVsWebFavorites::AddFavorite(
   [in] LPCOLESTR lpszURL, 
   [in] LPCOLESTR lpszName, 
   [in] LPCOLESTR pszIconFileName, 
   [in] int iIconIndex, 
   [out] BSTR * pbstrFileName
);

.NET Framework 安全性

请参见

参考

IVsWebFavorites 接口

Microsoft.VisualStudio.Shell.Interop 命名空间