IVsSmartTagData::GetContextMenuInfo Method (Guid, Int32, IOleCommandTarget^)

 

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)

int GetContextMenuInfo(
	[OutAttribute] Guid% guidID,
	[OutAttribute] int% nMenuID,
	[OutAttribute] IOleCommandTarget^% pCmdTarget
)

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.

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.

Return to top
Show: