共用方式為


IVsTaskProvider3.GetProviderToolbar Method

Returns a group GUID and toolbar ID indicating which toolbar should be displayed when this provider is active.

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

Syntax

'宣告
Function GetProviderToolbar ( _
    <OutAttribute> ByRef pguidGroup As Guid, _
    <OutAttribute> ByRef pdwID As UInteger _
) As Integer
'用途
Dim instance As IVsTaskProvider3
Dim pguidGroup As Guid
Dim pdwID As UInteger
Dim returnValue As Integer

returnValue = instance.GetProviderToolbar(pguidGroup, _
    pdwID)
int GetProviderToolbar(
    out Guid pguidGroup,
    out uint pdwID
)
int GetProviderToolbar(
    [OutAttribute] Guid% pguidGroup, 
    [OutAttribute] unsigned int% pdwID
)
abstract GetProviderToolbar : 
        pguidGroup:Guid byref * 
        pdwID:uint32 byref -> int 
function GetProviderToolbar(
    pguidGroup : Guid, 
    pdwID : uint
) : int

Parameters

  • pguidGroup
    Type: System.Guid%
    [out] A pointer to a Group Identifier (an object of type GUID).
  • pdwID
    Type: System.UInt32%
    [out] A pointer to an identifier (a value of unsigned integer type).

Return Value

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

Remarks

Set pguidGroup and pdwID to GUID_NULL and 0, respectively, to indicate that this provider has no toolbar. If you do provide a toolbar, you must include the provider dropdown as the first group, by including this line in your CTC file:

guidSHLMainMenu:IDG_VS_TASKLIST_PROVIDERLIST,<your toolbar's group>:<your toolbar menu ID>, 0x0100;

See vscommon\appid\inc\ShellCmdPlace.ctc for examples.

COM Signature

From vsshell80.idl:

HRESULT IVsTaskProvider3::GetProviderToolbar(
   [out] GUID* pguidGroup, 
   [out] DWORD* pdwID
);

.NET Framework Security

See Also

Reference

IVsTaskProvider3 Interface

IVsTaskProvider3 Members

Microsoft.VisualStudio.Shell.Interop Namespace