IVsRegisterPriorityCommandTarget.RegisterPriorityCommandTarget Method
Registers a new command target (IOleCommandTarget).
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function RegisterPriorityCommandTarget ( _
dwReserved As UInteger, _
pCmdTrgt As IOleCommandTarget, _
<OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
int RegisterPriorityCommandTarget(
uint dwReserved,
IOleCommandTarget pCmdTrgt,
out uint pdwCookie
)
int RegisterPriorityCommandTarget(
[InAttribute] unsigned int dwReserved,
[InAttribute] IOleCommandTarget^ pCmdTrgt,
[OutAttribute] unsigned int% pdwCookie
)
abstract RegisterPriorityCommandTarget :
dwReserved:uint32 *
pCmdTrgt:IOleCommandTarget *
pdwCookie:uint32 byref -> int
function RegisterPriorityCommandTarget(
dwReserved : uint,
pCmdTrgt : IOleCommandTarget,
pdwCookie : uint
) : int
Parameters
dwReserved
Type: UInt32[in] Must be zero.
pCmdTrgt
Type: Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget[in] Pointer to the IOleCommandTarget interface to register.
pdwCookie
Type: UInt32%[out] Pointer to a cookie (VSCOOKIE). Used when unregistering the command target.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
The method adds the new command target to the front of the list.
COM Signature
From vsshell.idl:
[C++]
HRESULT IVsRegisterPriorityCommandTarget::RegisterPriorityCommandTarget(
[in] DWORD dwReserved,
[in] IOleCommandTarget *pCmdTrgt,
[out,retval] VSCOOKIE *pdwCookie
);
.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.