IVsSupportItemHandoff.HandoffItem Method
Supports transferring an item from one project to another.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function HandoffItem ( _
itemid As UInteger, _
pProjDest As IVsProject3, _
pszMkDocumentOld As String, _
pszMkDocumentNew As String, _
punkWindowFrame As IVsWindowFrame _
) As Integer
int HandoffItem(
uint itemid,
IVsProject3 pProjDest,
string pszMkDocumentOld,
string pszMkDocumentNew,
IVsWindowFrame punkWindowFrame
)
int HandoffItem(
[InAttribute] unsigned int itemid,
[InAttribute] IVsProject3^ pProjDest,
[InAttribute] String^ pszMkDocumentOld,
[InAttribute] String^ pszMkDocumentNew,
[InAttribute] IVsWindowFrame^ punkWindowFrame
)
abstract HandoffItem :
itemid:uint32 *
pProjDest:IVsProject3 *
pszMkDocumentOld:string *
pszMkDocumentNew:string *
punkWindowFrame:IVsWindowFrame -> int
function HandoffItem(
itemid : uint,
pProjDest : IVsProject3,
pszMkDocumentOld : String,
pszMkDocumentNew : String,
punkWindowFrame : IVsWindowFrame
) : int
Parameters
- itemid
Type: System.UInt32
[in] Identifier of the item to be transferred.
- pProjDest
Type: Microsoft.VisualStudio.Shell.Interop.IVsProject3
[in] Project to which the document will be transferred.
- pszMkDocumentOld
Type: System.String
[in] String form of the moniker identifier of the document in the project system for the document prior to transfer. The requesting project will pass this value to RenameDocument in the pszDocumentOld parameter.
- pszMkDocumentNew
Type: System.String
[in] String form of the moniker identifier of the document in the project system for the document following transfer. The requesting project will pass this value to RenameDocument as the pszDocumentNew parameter.
- punkWindowFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
[in] Pointer to the window frame containing the document view. This parameter is optional if the document is not open.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsSupportItemHandoff::HandoffItem(
[in] VSITEMID itemid,
[in] IVsProject3 *pProjDest,
[in] LPCOLESTR pszMkDocumentOld,
[in] LPCOLESTR pszMkDocumentNew,
[in] IVsWindowFrame *punkWindowFrame
);
In your IVsSupportItemHandoff.HandoffItem implementation, call TransferItem on the project requesting the item (pProjDest). In the method call, pass the values in pszMkDocumentOld, pszMkDocumentNew, and punkWindowFrame to the requesting project. The requesting project will then transfer the open document window for the item to itself and rename the document appropriately in the running document table (RDT) by calling RenameDocument.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.