Partager via


IVsSmartTagData.GetContextMenuInfo(Guid, Int32, IOleCommandTarget) Method

Definition

Gets information about the context menu.

public:
 int GetContextMenuInfo([Runtime::InteropServices::Out] Guid % guidID, [Runtime::InteropServices::Out] int % nMenuID, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ % pCmdTarget);
public int GetContextMenuInfo (out Guid guidID, out int nMenuID, out Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pCmdTarget);
abstract member GetContextMenuInfo : Guid * int * IOleCommandTarget -> int
Public Function GetContextMenuInfo (ByRef guidID As Guid, ByRef nMenuID As Integer, ByRef pCmdTarget As IOleCommandTarget) As Integer

Parameters

guidID
Guid

[out] The GUID of the context menu.

nMenuID
Int32

[out] The menu ID of the context menu.

pCmdTarget
IOleCommandTarget

[out] The IOleCommandTarget of the context menu.

Returns

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.

Applies to