IVsOwnedProjectFactory::InitializeForOwner Method (String^, String^, String^, UInt32, Guid, UInt32, IntPtr, Int32)

 

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

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int InitializeForOwner(
	String^ pszFilename,
	String^ pszLocation,
	String^ pszName,
	unsigned int grfCreateFlags,
	[InAttribute] Guid% iidProject,
	unsigned int cookie,
	[OutAttribute] IntPtr% ppvProject,
	[OutAttribute] int% pfCanceled
)

Parameters

pszFilename
Type: System::String^

[in] Pointer to a null terminated string containing the filename.

pszLocation
Type: System::String^

[in] Pointer to a null terminated string containing the location.

pszName
Type: System::String^

[in] Pointer to a null terminated string containing the name.

grfCreateFlags
Type: System::UInt32

[in] Specifies the create flags. Values are taken from the __VSCREATEPROJFLAGS enum.

iidProject
Type: System::Guid

[in] Specifies iidProject.

cookie
Type: System::UInt32

[in] Cookie identifying the owned project.

ppvProject
Type: System::IntPtr

[out] Specifies ppvProject.

pfCanceled
Type: System::Int32

[out] Pointer to a flag indicating canceled.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsOwnedProjectFactory::InitializeForOwner(
   [in] LPCOLESTR pszFilename,
   [in] LPCOLESTR pszLocation,
   [in] LPCOLESTR pszName,
   [in] VSCREATEPROJFLAGS grfCreateFlags,
   [in] REFIID iidProject,
   [in] VSOWNEDPROJECTOBJECT cookie,
   [out, iid_is(iidProject)] void **ppvProject,
   [out] BOOL *pfCanceled
);

Called by the owner to tell the owned project to do all its initialization. The owned project should do all its CreateProject work in here. The cookie parameter is just the cookie that the owned project passed back in PreCreateForOwner. This allows the owned project to create its project object cookie: additional parameter over CreateProject.

Return to top
Show: