IVsRegisterPriorityCommandTarget::RegisterPriorityCommandTarget Method (UInt32, IOleCommandTarget^, UInt32)
Visual Studio 2015
Registers a new command target (IOleCommandTarget).
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int RegisterPriorityCommandTarget( unsigned int dwReserved, IOleCommandTarget^ pCmdTrgt, [OutAttribute] unsigned int% pdwCookie )
Parameters
- dwReserved
-
Type:
System::UInt32
[in] Must be zero.
- pCmdTrgt
-
Type:
Microsoft.VisualStudio.OLE.Interop::IOleCommandTarget^
[in] Pointer to the IOleCommandTarget interface to register.
- pdwCookie
-
Type:
System::UInt32
[out] Pointer to a cookie (VSCOOKIE). Used when unregistering the command target.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
The method adds the new command target to the front of the list.
From vsshell.idl:
[C++]
HRESULT IVsRegisterPriorityCommandTarget::RegisterPriorityCommandTarget( [in] DWORD dwReserved, [in] IOleCommandTarget *pCmdTrgt, [out,retval] VSCOOKIE *pdwCookie );
Show: