IVsProfferCommands4.AddNamedCommand3 Method

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaración
Function AddNamedCommand3 ( _
    ByRef pguidPackage As Guid, _
    ByRef pguidCmdGroup As Guid, _
    pszCmdNameCanonical As String, _
    <OutAttribute> ByRef pdwCmdId As UInteger, _
    pszCmdNameLocalized As String, _
    pszBtnText As String, _
    pszCmdTooltip As String, _
    punkImage As Object, _
    dwCmdFlagsDefault As UInteger, _
    cUIContexts As UInteger, _
    rgguidUIContexts As Guid(), _
    dwUIElementType As UInteger _
) As Integer
'Uso
Dim instance As IVsProfferCommands4
Dim pguidPackage As Guid
Dim pguidCmdGroup As Guid
Dim pszCmdNameCanonical As String
Dim pdwCmdId As UInteger
Dim pszCmdNameLocalized As String
Dim pszBtnText As String
Dim pszCmdTooltip As String
Dim punkImage As Object
Dim dwCmdFlagsDefault As UInteger
Dim cUIContexts As UInteger
Dim rgguidUIContexts As Guid()
Dim dwUIElementType As UInteger
Dim returnValue As Integer

returnValue = instance.AddNamedCommand3(pguidPackage, _
    pguidCmdGroup, pszCmdNameCanonical, _
    pdwCmdId, pszCmdNameLocalized, pszBtnText, _
    pszCmdTooltip, punkImage, dwCmdFlagsDefault, _
    cUIContexts, rgguidUIContexts, dwUIElementType)
int AddNamedCommand3(
    ref Guid pguidPackage,
    ref Guid pguidCmdGroup,
    string pszCmdNameCanonical,
    out uint pdwCmdId,
    string pszCmdNameLocalized,
    string pszBtnText,
    string pszCmdTooltip,
    Object punkImage,
    uint dwCmdFlagsDefault,
    uint cUIContexts,
    Guid[] rgguidUIContexts,
    uint dwUIElementType
)
int AddNamedCommand3(
    [InAttribute] Guid% pguidPackage, 
    [InAttribute] Guid% pguidCmdGroup, 
    [InAttribute] String^ pszCmdNameCanonical, 
    [OutAttribute] unsigned int% pdwCmdId, 
    [InAttribute] String^ pszCmdNameLocalized, 
    [InAttribute] String^ pszBtnText, 
    [InAttribute] String^ pszCmdTooltip, 
    [InAttribute] Object^ punkImage, 
    [InAttribute] unsigned int dwCmdFlagsDefault, 
    [InAttribute] unsigned int cUIContexts, 
    [InAttribute] array<Guid>^ rgguidUIContexts, 
    [InAttribute] unsigned int dwUIElementType
)
abstract AddNamedCommand3 : 
        pguidPackage:Guid byref * 
        pguidCmdGroup:Guid byref * 
        pszCmdNameCanonical:string * 
        pdwCmdId:uint32 byref * 
        pszCmdNameLocalized:string * 
        pszBtnText:string * 
        pszCmdTooltip:string * 
        punkImage:Object * 
        dwCmdFlagsDefault:uint32 * 
        cUIContexts:uint32 * 
        rgguidUIContexts:Guid[] * 
        dwUIElementType:uint32 -> int 
function AddNamedCommand3(
    pguidPackage : Guid, 
    pguidCmdGroup : Guid, 
    pszCmdNameCanonical : String, 
    pdwCmdId : uint, 
    pszCmdNameLocalized : String, 
    pszBtnText : String, 
    pszCmdTooltip : String, 
    punkImage : Object, 
    dwCmdFlagsDefault : uint, 
    cUIContexts : uint, 
    rgguidUIContexts : Guid[], 
    dwUIElementType : uint
) : int

Parameters

  • pguidPackage
    Type: System.Guid%
    [in] The package GUID. Use nulla null reference (Nothing in Visual Basic) for addins.
  • pguidCmdGroup
    Type: System.Guid%
    [in] The GUID for the group to receive the new command. Use GUID_Macro or GUID_AddIn defined in vbapkg.idl.
  • pszCmdNameCanonical
    Type: System.String
    [in] The full name of the command.
  • pdwCmdId
    Type: System.UInt32%
    [out] The ID for the new command.
  • pszCmdNameLocalized
    Type: System.String
    [in] A localized version of the string. May be nulla null reference (Nothing in Visual Basic).
  • pszBtnText
    Type: System.String
    [in] The text to display on a button. Use nulla null reference (Nothing in Visual Basic) if the added command isn't a button.
  • pszCmdTooltip
    Type: System.String
    [in] The ToolTip text to display. May be nulla null reference (Nothing in Visual Basic).
  • dwCmdFlagsDefault
    Type: System.UInt32
    [in] Use zero (0) for the default values to make the command active and visible.
  • cUIContexts
    Type: System.UInt32
    [in] The number of contexts pointed to by the rgguidUIContexts parameter.
  • rgguidUIContexts
    Type: array<System.Guid[]
    [in] An array of GUIDs for the user interface contexts indicating options for displaying the command. For more information, see the UIContext_ members of VSConstants.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

.NET Framework Security

See Also

Reference

IVsProfferCommands4 Interface

IVsProfferCommands4 Members

Microsoft.VisualStudio.Shell.Interop Namespace