IVsRegisterPriorityCommandTarget.RegisterPriorityCommandTarget 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将新的命令目标注册 (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
参数
- dwReserved
- UInt32
中必须为零。
- pCmdTrgt
- IOleCommandTarget
中指向 IOleCommandTarget 要注册的接口的指针。
- pdwCookie
- UInt32
弄指向 cookie (VSCOOKIE) 的指针。 在注销命令目标时使用。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
方法将新的命令目标添加到列表的前面。
COM 签名
从 vsshell:
[C++]
HRESULT IVsRegisterPriorityCommandTarget::RegisterPriorityCommandTarget(
[in] DWORD dwReserved,
[in] IOleCommandTarget *pCmdTrgt,
[out,retval] VSCOOKIE *pdwCookie
);