共用方式為


IVsCmdNameMapping.MapGUIDIDToName(Guid, UInt32, VSCMDNAMEOPTS, String) Method

Definition

Map the GUID and identifier of a command to its name.

public:
 int MapGUIDIDToName(Guid % pguidCmdGroup, System::UInt32 dwCmdID, Microsoft::VisualStudio::Shell::Interop::VSCMDNAMEOPTS grfOptions, [Runtime::InteropServices::Out] System::String ^ % pbstrCmdName);
public int MapGUIDIDToName (ref Guid pguidCmdGroup, uint dwCmdID, Microsoft.VisualStudio.Shell.Interop.VSCMDNAMEOPTS grfOptions, out string pbstrCmdName);
abstract member MapGUIDIDToName : Guid * uint32 * Microsoft.VisualStudio.Shell.Interop.VSCMDNAMEOPTS * string -> int
Public Function MapGUIDIDToName (ByRef pguidCmdGroup As Guid, dwCmdID As UInteger, grfOptions As VSCMDNAMEOPTS, ByRef pbstrCmdName As String) As Integer

Parameters

pguidCmdGroup
Guid

[in] The GUID of the group the command belongs to.

dwCmdID
UInt32

[in] The identifier of the command.

grfOptions
VSCMDNAMEOPTS

[in] Bit flags specifying what form of the name to retrieve. Values taken from the VSCMDNAMEOPTS enumeration.

pbstrCmdName
String

[out] String containing the command name.

Returns

If the method succeeds, it returns S_OK. Returns S_FALSE if it cannot find the matching name.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsCmdNameMapping::MapGUIDIDToName(  
   [in] const GUID *pguidCmdGroup, ]  
   [in] DWORD dwCmdID,   
   [in] VSCMDNAMEOPTS grfOptions,   
   [out] BSTR *pbstrCmdName  
);  

Applies to