Maps the name of a command to the GUID of its group and its identifier.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function MapNameToGUIDID ( _
pszCmdName As String, _
<OutAttribute> ByRef pguidCmdGroup As Guid, _
<OutAttribute> ByRef pdwCmdID As UInteger _
) As Integer
'使用
Dim instance As IVsCmdNameMapping
Dim pszCmdName As String
Dim pguidCmdGroup As Guid
Dim pdwCmdID As UInteger
Dim returnValue As Integer
returnValue = instance.MapNameToGUIDID(pszCmdName, _
pguidCmdGroup, pdwCmdID)
int MapNameToGUIDID(
string pszCmdName,
out Guid pguidCmdGroup,
out uint pdwCmdID
)
int MapNameToGUIDID(
[InAttribute] String^ pszCmdName,
[OutAttribute] Guid% pguidCmdGroup,
[OutAttribute] unsigned int% pdwCmdID
)
function MapNameToGUIDID(
pszCmdName : String,
pguidCmdGroup : Guid,
pdwCmdID : uint
) : int
Parameters
pszCmdName
Type: System.String[in] String containing the name of the command.
pguidCmdGroup
Type: System.Guid%[out] The GUID of the group the command belongs to.
pdwCmdID
Type: System.UInt32%[out] The command's identifier.
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 vsshell.idl:
HRESULT IVsCmdNameMapping::MapNameToGUIDID(
[in] const LPCOLESTR pszCmdName,
out] GUID *pguidCmdGroup,
out] DWORD *pdwCmdID
);
Permissions
- 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.