IVsRegisterPriorityCommandTarget.RegisterPriorityCommandTarget Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a new command target (IOleCommandTarget).
public:
int RegisterPriorityCommandTarget(System::UInt32 dwReserved, Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pCmdTrgt, [Runtime::InteropServices::Out] System::UInt32 % pdwCookie);
int RegisterPriorityCommandTarget(unsigned int dwReserved, Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget const & pCmdTrgt, [Runtime::InteropServices::Out] unsigned int & pdwCookie);
public int RegisterPriorityCommandTarget (uint dwReserved, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pCmdTrgt, out uint pdwCookie);
abstract member RegisterPriorityCommandTarget : uint32 * Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget * uint32 -> int
Public Function RegisterPriorityCommandTarget (dwReserved As UInteger, pCmdTrgt As IOleCommandTarget, ByRef pdwCookie As UInteger) As Integer
Parameters
- dwReserved
- UInt32
[in] Must be zero.
- pCmdTrgt
- IOleCommandTarget
[in] Pointer to the IOleCommandTarget interface to register.
- pdwCookie
- UInt32
[out] Pointer to a cookie (VSCOOKIE). Used when unregistering the command target.
Returns
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
);