Compartir a través de


IVsOwnedProjectFactory Interface

Definition

Used by projects that support being aggregated by an Owner to persist the OwnerKey in their project file.

public interface class IVsOwnedProjectFactory
public interface class IVsOwnedProjectFactory
__interface IVsOwnedProjectFactory
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("E4197123-1086-4D51-B2D5-903F4D61C5AA")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsOwnedProjectFactory
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("E4197123-1086-4D51-B2D5-903F4D61C5AA")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsOwnedProjectFactory
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("E4197123-1086-4D51-B2D5-903F4D61C5AA")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsOwnedProjectFactory = interface
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("E4197123-1086-4D51-B2D5-903F4D61C5AA")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsOwnedProjectFactory = interface
Public Interface IVsOwnedProjectFactory
Attributes

Remarks

Projects that support being aggregated by an Owner must persist the OwnerKey in their project file. When CreateProject is called on a project with an OwnerKey, the owned project should convert its OwnerKey to a project factory GUID then call CreateProject on this project factory to do the actual creation.

An owner will create its owned project in two phases:

  1. Call PreCreateForOwner. This gives the owned project a chance to create an aggregated project object based on the input controlling IUnknown (pUnkOwner). The owned project passes back the inner IUnknown and the aggregated object to the owner project, giving it a chance to store the inner IUnknown.

  2. Call InitializeForOwner. The owned project does all its instantiation here (what usually goes into CreateProject on unowned projects). The input VSOWNEDPROJECTOBJECT is typically the aggregated owned project. The owned project can use this variable to determine if its project object has already been created (cookie !=null) or needs to be created (cookie==null).

Related Property: VSHPROPID_OwnerKey — BSTR owner key string that identifies the project GUID of the owning project. Only projects that implement IVsOwnedProjectFactory should support this property.

Notes to Implementers

Implemented by projects that support being aggregated by an Owner to persist the OwnerKey in their project file.

Notes to Callers

Called by an owner to create its owned project.

Methods

InitializeForOwner(String, String, String, UInt32, Guid, IntPtr, IntPtr, Int32)
InitializeForOwner(String, String, String, UInt32, Guid, UInt32, IntPtr, Int32)

Called by the project owner to tell the owned project to do all its initialization.

PreCreateForOwner(Object, Object, IntPtr)
PreCreateForOwner(Object, Object, UInt32)

Gives the owned project a chance to create an aggregated project object based on the input controlling IUnknown (pUnkOwner).

Applies to