IVsFilterKeys.TranslateAccelerator Method
Takes a Windows message, translates it into a command, and, optionally, executes the command.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function TranslateAccelerator ( _
pMsg As MSG(), _
dwFlags As UInteger, _
<OutAttribute> ByRef pguidCmd As Guid, _
<OutAttribute> ByRef pdwCmd As UInteger _
) As Integer
'Usage
Dim instance As IVsFilterKeys
Dim pMsg As MSG()
Dim dwFlags As UInteger
Dim pguidCmd As Guid
Dim pdwCmd As UInteger
Dim returnValue As Integer
returnValue = instance.TranslateAccelerator(pMsg, _
dwFlags, pguidCmd, pdwCmd)
int TranslateAccelerator(
MSG[] pMsg,
uint dwFlags,
out Guid pguidCmd,
out uint pdwCmd
)
int TranslateAccelerator(
[InAttribute] array<MSG>^ pMsg,
[InAttribute] unsigned int dwFlags,
[OutAttribute] Guid% pguidCmd,
[OutAttribute] unsigned int% pdwCmd
)
function TranslateAccelerator(
pMsg : MSG[],
dwFlags : uint,
pguidCmd : Guid,
pdwCmd : uint
) : int
Parameters
pMsg
Type: array<Microsoft.VisualStudio.OLE.Interop.MSG[][in] Pointer to the Windows message.
dwFlags
Type: System.UInt32[in] Bit flags to determine whether or not to perform default actions, or to execute the command. Values formed from the __VSTRANSACCELFLAGS enumeration.
pguidCmd
Type: System.Guid%[out] Pointer to the GUID of the corresponding command.
pdwCmd
Type: System.UInt32%[out] Pointer to the identifier of the command.
Return Value
Type: System.Int32
If the message does or will translate to a command, the method returns S_OK and fills the pguidCmd and pdwCmd parameters with the command's GUID and ID. If the message does not or will not translate to a command, the method returns S_FALSE, and sets the two parameters to zero.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsFilterKeys::TranslateAccelerator(
[in] LPMSG pMsg,
[in] VSTRANSACCELFLAGS dwFlags,
[out] GUID *pguidCmd,
[out] DWORD *pdwCmd
);
.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.