IVsWebFavorites.AddFavorite Method
Add an item to the Favorites list.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Déclaration
Function AddFavorite ( _
lpszURL As String, _
lpszName As String, _
pszIconFileName As String, _
iIconIndex As Integer, _
<OutAttribute> pbstrFilename As String() _
) As Integer
'Utilisation
Dim instance As IVsWebFavorites
Dim lpszURL As String
Dim lpszName As String
Dim pszIconFileName As String
Dim iIconIndex As Integer
Dim pbstrFilename As String()
Dim returnValue As Integer
returnValue = instance.AddFavorite(lpszURL, _
lpszName, pszIconFileName, iIconIndex, _
pbstrFilename)
int AddFavorite(
string lpszURL,
string lpszName,
string pszIconFileName,
int iIconIndex,
string[] pbstrFilename
)
int AddFavorite(
[InAttribute] String^ lpszURL,
[InAttribute] String^ lpszName,
[InAttribute] String^ pszIconFileName,
[InAttribute] int iIconIndex,
[OutAttribute] array<String^>^ pbstrFilename
)
abstract AddFavorite :
lpszURL:string *
lpszName:string *
pszIconFileName:string *
iIconIndex:int *
pbstrFilename:string[] byref -> int
function AddFavorite(
lpszURL : String,
lpszName : String,
pszIconFileName : String,
iIconIndex : int,
pbstrFilename : String[]
) : int
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 nulla null reference (Nothing in Visual Basic).
- 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 nulla null reference (Nothing in Visual Basic).
Return Value
Type: System.Int32
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
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.