Find the object implementing a specific command.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣言
Function FindCommandBar ( _
pToolbarSet As Object, _
ByRef pguidCmdGroup As Guid, _
dwMenuId As UInteger, _
<OutAttribute> ByRef ppdispCmdBar As Object _
) As Integer
'使用
Dim instance As IVsProfferCommands3
Dim pToolbarSet As Object
Dim pguidCmdGroup As Guid
Dim dwMenuId As UInteger
Dim ppdispCmdBar As Object
Dim returnValue As Integer
returnValue = instance.FindCommandBar(pToolbarSet, _
pguidCmdGroup, dwMenuId, ppdispCmdBar)
int FindCommandBar(
Object pToolbarSet,
ref Guid pguidCmdGroup,
uint dwMenuId,
out Object ppdispCmdBar
)
int FindCommandBar(
[InAttribute] Object^ pToolbarSet,
[InAttribute] Guid% pguidCmdGroup,
[InAttribute] unsigned int dwMenuId,
[OutAttribute] Object^% ppdispCmdBar
)
function FindCommandBar(
pToolbarSet : Object,
pguidCmdGroup : Guid,
dwMenuId : uint,
ppdispCmdBar : Object
) : int
Parameters
pToolbarSet
Type: System.Object[in] Pointer to the IUnknown interface of the toolbar set to search. Use a null reference (Nothing in Visual Basic) to search the main (default) toolbar set.
pguidCmdGroup
Type: System.Guid%[in] Pointer to the GUID for the command group to search. Use GUID_Macro or GUID_AddIn defined in vbapkg.idl.
dwMenuId
Type: System.UInt32[in] Integer. The id of the menu item corresponding to the command.
ppdispCmdBar
Type: System.Object%[out] Pointer to the IDispatch interface of the object.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Permissions
- 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.