IVsSmartTagData.GetContextMenuInfo Method
Gets information about the context menu.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'Declaration
Function GetContextMenuInfo ( _
<OutAttribute> ByRef guidID As Guid, _
<OutAttribute> ByRef nMenuID As Integer, _
<OutAttribute> ByRef pCmdTarget As IOleCommandTarget _
) As Integer
int GetContextMenuInfo(
out Guid guidID,
out int nMenuID,
out IOleCommandTarget pCmdTarget
)
int GetContextMenuInfo(
[OutAttribute] Guid% guidID,
[OutAttribute] int% nMenuID,
[OutAttribute] IOleCommandTarget^% pCmdTarget
)
abstract GetContextMenuInfo :
guidID:Guid byref *
nMenuID:int byref *
pCmdTarget:IOleCommandTarget byref -> int
function GetContextMenuInfo(
guidID : Guid,
nMenuID : int,
pCmdTarget : IOleCommandTarget
) : int
Parameters
- guidID
Type: System.Guid%
[out] The GUID of the context menu.
- nMenuID
Type: System.Int32%
[out] The menu ID of the context menu.
- pCmdTarget
Type: Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget%
[out] The IOleCommandTarget of the context menu.
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 textmgr2.idl:
HRESULT IVsSmartTagData::GetContextMenuInfo(
[out] GUID *guidID,
[out]long *nMenuID,
[out]IOleCommandTarget **pCmdTarget
);
GetContextMenuInfo returns S_FALSE if OnInvocation should be called for non-context menu UIs.
.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.