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

‘선언
Function RegisterPriorityCommandTarget ( _
    dwReserved As UInteger, _
    pCmdTrgt As IOleCommandTarget, _
    <OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsRegisterPriorityCommandTarget
Dim dwReserved As UInteger
Dim pCmdTrgt As IOleCommandTarget
Dim pdwCookie As UInteger
Dim returnValue As Integer

returnValue = instance.RegisterPriorityCommandTarget(dwReserved, _
    pCmdTrgt, pdwCookie)
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

  • pdwCookie
    Type: System.UInt32%
    [out] Pointer to a cookie (VSCOOKIE). Used when unregistering the command target.

Return Value

Type: System.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

See Also

Reference

IVsRegisterPriorityCommandTarget Interface

IVsRegisterPriorityCommandTarget Members

Microsoft.VisualStudio.Shell.Interop Namespace