IVsSupportItemHandoff.HandoffItem 方法

定义

支持将项从一个项目传输到另一个项目。

public:
 int HandoffItem(System::UInt32 itemid, Microsoft::VisualStudio::Shell::Interop::IVsProject3 ^ pProjDest, System::String ^ pszMkDocumentOld, System::String ^ pszMkDocumentNew, Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ punkWindowFrame);
public:
 int HandoffItem(unsigned int itemid, Microsoft::VisualStudio::Shell::Interop::IVsProject3 ^ pProjDest, Platform::String ^ pszMkDocumentOld, Platform::String ^ pszMkDocumentNew, Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ punkWindowFrame);
int HandoffItem(unsigned int itemid, Microsoft::VisualStudio::Shell::Interop::IVsProject3 const & pProjDest, std::wstring const & pszMkDocumentOld, std::wstring const & pszMkDocumentNew, Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame const & punkWindowFrame);
public int HandoffItem (uint itemid, Microsoft.VisualStudio.Shell.Interop.IVsProject3 pProjDest, string pszMkDocumentOld, string pszMkDocumentNew, Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame punkWindowFrame);
abstract member HandoffItem : uint32 * Microsoft.VisualStudio.Shell.Interop.IVsProject3 * string * string * Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame -> int
Public Function HandoffItem (itemid As UInteger, pProjDest As IVsProject3, pszMkDocumentOld As String, pszMkDocumentNew As String, punkWindowFrame As IVsWindowFrame) As Integer

参数

itemid
UInt32

中要传输的项的标识符。

pProjDest
IVsProject3

中文档将传输到的项目。

pszMkDocumentOld
String

中文件在传输之前的项目系统中文档的名字对象标识符的字符串格式。 请求项目会将此值传递给 RenameDocument(String, String, IntPtr, UInt32) 参数中的 pszDocumentOld

pszMkDocumentNew
String

中转换后文档的项目系统中文档的名字对象标识符的字符串格式。 请求项目会将此值 RenameDocument(String, String, IntPtr, UInt32) 作为参数传递给 pszDocumentNew

punkWindowFrame
IVsWindowFrame

中一个指针,指向包含文档视图的窗口框架。 如果文档未打开,则此参数是可选的。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell:

HRESULT IVsSupportItemHandoff::HandoffItem(  
   [in] VSITEMID itemid,  
   [in] IVsProject3 *pProjDest,  
   [in] LPCOLESTR pszMkDocumentOld,  
   [in] LPCOLESTR pszMkDocumentNew,  
   [in] IVsWindowFrame *punkWindowFrame  
);  

IVsSupportItemHandoff.HandoffItem 实现中,对 TransferItem 请求项的项目调用 (pProjDest) 。 在方法调用中,将、和中的值传递 pszMkDocumentOld pszMkDocumentNew punkWindowFrame 给请求项目。 发出请求的项目之后,会通过调用将该项目的打开的文档窗口传输到自身,并在正在运行的文档表中正确重命名该文档 (RDT) RenameDocument

适用于