IVsMenuEditorSite.CreateItem Method
The host is responsible for giving the menu a unique name, and providing back to IVsMenuEditor a valid IVsMenuItem*. As in IVsMenuEditor::AddItem, both IMIParent and pIMIInsertAfter can be NULL.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function CreateItem ( _
pIMIParent As IVsMenuItem, _
pIMIInsertAfter As IVsMenuItem, _
<OutAttribute> ByRef ppIMINew As IVsMenuItem _
) As Integer
int CreateItem(
IVsMenuItem pIMIParent,
IVsMenuItem pIMIInsertAfter,
out IVsMenuItem ppIMINew
)
int CreateItem(
[InAttribute] IVsMenuItem^ pIMIParent,
[InAttribute] IVsMenuItem^ pIMIInsertAfter,
[OutAttribute] IVsMenuItem^% ppIMINew
)
abstract CreateItem :
pIMIParent:IVsMenuItem *
pIMIInsertAfter:IVsMenuItem *
ppIMINew:IVsMenuItem byref -> int
function CreateItem(
pIMIParent : IVsMenuItem,
pIMIInsertAfter : IVsMenuItem,
ppIMINew : IVsMenuItem
) : int
Parameters
pIMIParent
Type: Microsoft.VisualStudio.Shell.Interop.IVsMenuItem[In] A pointer to an object of type IVsMenuItem representing the parent menu item.
pIMIInsertAfter
Type: Microsoft.VisualStudio.Shell.Interop.IVsMenuItem[In] A pointer to an object of type IVsMenuItem representing the menu item after which the new items will be inserted.
ppIMINew
Type: Microsoft.VisualStudio.Shell.Interop.IVsMenuItem%[Out] A pointer to an object of type IVsMenuItem representing the new menu item.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
[C++]
HRESULT IVsMenuEditorSite::CreateItem(
[in]IVsMenuItem *pIMIParent,
[in]IVsMenuItem *pIMIInsertAfter,
[out]IVsMenuItem **ppIMINew
);
.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.