IVsRegisterPriorityCommandTarget::RegisterPriorityCommandTarget Method (UInt32, IOleCommandTarget^, UInt32)

 

Registers a new command target (IOleCommandTarget).

Namespace:   Microsoft.VisualStudio.Shell.Interop
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::Int32

If 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
);
Return to top
Show: