Share via


IVsOwnedProjectFactory.PreCreateForOwner Method

Definition

Overloads

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).

PreCreateForOwner(Object, Object, IntPtr)

public:
 int PreCreateForOwner(System::Object ^ pUnkOwner, [Runtime::InteropServices::Out] System::Object ^ % ppUnkInner, [Runtime::InteropServices::Out] IntPtr % pCookie);
public int PreCreateForOwner (object pUnkOwner, out object ppUnkInner, out IntPtr pCookie);
abstract member PreCreateForOwner : obj * obj * nativeint -> int
Public Function PreCreateForOwner (pUnkOwner As Object, ByRef ppUnkInner As Object, ByRef pCookie As IntPtr) As Integer

Parameters

pUnkOwner
Object
ppUnkInner
Object
pCookie
IntPtr

nativeint

Returns

Applies to

PreCreateForOwner(Object, Object, UInt32)

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

public:
 int PreCreateForOwner(System::Object ^ pUnkOwner, [Runtime::InteropServices::Out] System::Object ^ % ppUnkInner, [Runtime::InteropServices::Out] System::UInt32 % pCookie);
int PreCreateForOwner(winrt::Windows::Foundation::IInspectable const & pUnkOwner, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & ppUnkInner, [Runtime::InteropServices::Out] unsigned int & pCookie);
public int PreCreateForOwner (object pUnkOwner, out object ppUnkInner, out uint pCookie);
abstract member PreCreateForOwner : obj * obj * uint32 -> int
Public Function PreCreateForOwner (pUnkOwner As Object, ByRef ppUnkInner As Object, ByRef pCookie As UInteger) As Integer

Parameters

pUnkOwner
Object

[in] Pointer to an IUnknown owner object.

ppUnkInner
Object

[out] Pointer to a pointer to an IUnknown inner object.

pCookie
UInt32

[out] Pointer to a cookie object.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsOwnedProjectFactory::PreCreateForOwner(  
   [in] IUnknown *pUnkOwner,  
   [out] IUnknown **ppUnkInner,  
   [out] VSOWNEDPROJECTOBJECT* pCookie  
);  

Called by the owner/outer so that the owned/inner project can create an aggregated version of itself, using pOwner as the controlling IUnknown. The owned project should only create its project object instance here. All the heavy initialization work should occur in InitializeForOwner. That ensures the owner/outer project will work correctly during the owned/inner initialization. The owned project must return its inner IUnknown and its Project object (cast as a VSOWNEDPROJECTOBJECT cookie) back to the owning project.

Applies to