IVsWebFavorites.AddFavorite(String, String, String, Int32, String[]) Method

Definition

Add an item to the Favorites list.

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

Parameters

lpszURL
String

[in] Pointer to a string containing the URL to add.

lpszName
String

[in] Pointer to a string containing the default display name.

pszIconFileName
String

[in] Pointer to string containing the name of the file containing the icon to display next to the URL. May be null.

iIconIndex
Int32

[in] Integer. The index of the icon within the file given in pszIconFileName.

pbstrFilename
String[]

[out] Pointer to the file containing the shortcut to the favorite. May be null.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsbrowse.idl:

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

Applies to