IVsWebFavorites::AddFavorite Method (String^, String^, String^, Int32, array<String^>^)
Visual Studio 2015
Add an item to the Favorites list.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int AddFavorite( String^ lpszURL, String^ lpszName, String^ pszIconFileName, int iIconIndex, array<String^>^ pbstrFilename )
Parameters
- lpszURL
-
Type:
System::String^
[in] Pointer to a string containing the URL to add.
- lpszName
-
Type:
System::String^
[in] Pointer to a string containing the default display name.
- pszIconFileName
-
Type:
System::String^
[in] Pointer to string containing the name of the file containing the icon to display next to the URL. May be null.
- iIconIndex
-
Type:
System::Int32
[in] Integer. The index of the icon within the file given in pszIconFileName.
- pbstrFilename
-
Type:
array<System::String^>^
[out] Pointer to the file containing the shortcut to the favorite. May be null.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsbrowse.idl:
HRESULT IVsWebFavorites::AddFavorite( [in] LPCOLESTR lpszURL, [in] LPCOLESTR lpszName, [in] LPCOLESTR pszIconFileName, [in] int iIconIndex, [out] BSTR * pbstrFileName );
Show: