IVsWebFavorites.AddFavorite(String, String, String, Int32, String[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将项目添加到收藏夹列表。
public:
int AddFavorite(System::String ^ lpszURL, System::String ^ lpszName, System::String ^ pszIconFileName, int iIconIndex, cli::array <System::String ^> ^ pbstrFilename);
public:
int AddFavorite(Platform::String ^ lpszURL, Platform::String ^ lpszName, Platform::String ^ pszIconFileName, int iIconIndex, Platform::Array <Platform::String ^> ^ pbstrFilename);
int AddFavorite(std::wstring const & lpszURL, std::wstring const & lpszName, std::wstring const & pszIconFileName, int iIconIndex, std::Array <std::wstring const &> const & pbstrFilename);
public int AddFavorite (string lpszURL, string lpszName, string pszIconFileName, int iIconIndex, string[] pbstrFilename);
abstract member AddFavorite : string * string * string * int * string[] -> int
Public Function AddFavorite (lpszURL As String, lpszName As String, pszIconFileName As String, iIconIndex As Integer, pbstrFilename As String()) As Integer
参数
- lpszURL
- String
中一个指针,指向包含要添加的 URL 的字符串。
- lpszName
- String
中指向包含默认显示名称的字符串的指针。
- pszIconFileName
- String
中指向字符串的指针,该字符串包含包含要显示在 URL 旁边的图标的文件的名称。 可为 null。
- iIconIndex
- Int32
中整数. 中给定的文件中的图标索引 pszIconFileName 。
- pbstrFilename
- String[]
弄指向包含收藏夹快捷方式的文件的指针。 可为 null。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 vsbrowse:
HRESULT IVsWebFavorites::AddFavorite(
[in] LPCOLESTR lpszURL,
[in] LPCOLESTR lpszName,
[in] LPCOLESTR pszIconFileName,
[in] int iIconIndex,
[out] BSTR * pbstrFileName
);