IVsOwnedProjectFactory.InitializeForOwner Method

Definition

Overloads

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.

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

public:
 int InitializeForOwner(System::String ^ pszFilename, System::String ^ pszLocation, System::String ^ pszName, System::UInt32 grfCreateFlags, Guid % iidProject, IntPtr cookie, [Runtime::InteropServices::Out] IntPtr % ppvProject, [Runtime::InteropServices::Out] int % pfCanceled);
public int InitializeForOwner (string pszFilename, string pszLocation, string pszName, uint grfCreateFlags, ref Guid iidProject, IntPtr cookie, out IntPtr ppvProject, out int pfCanceled);
abstract member InitializeForOwner : string * string * string * uint32 * Guid * nativeint * nativeint * int -> int
Public Function InitializeForOwner (pszFilename As String, pszLocation As String, pszName As String, grfCreateFlags As UInteger, ByRef iidProject As Guid, cookie As IntPtr, ByRef ppvProject As IntPtr, ByRef pfCanceled As Integer) As Integer

Parameters

pszFilename
String
pszLocation
String
pszName
String
grfCreateFlags
UInt32
iidProject
Guid
cookie
IntPtr

nativeint

ppvProject
IntPtr

nativeint

pfCanceled
Int32

Returns

Applies to

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

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

public:
 int InitializeForOwner(System::String ^ pszFilename, System::String ^ pszLocation, System::String ^ pszName, System::UInt32 grfCreateFlags, Guid % iidProject, System::UInt32 cookie, [Runtime::InteropServices::Out] IntPtr % ppvProject, [Runtime::InteropServices::Out] int % pfCanceled);
public int InitializeForOwner (string pszFilename, string pszLocation, string pszName, uint grfCreateFlags, ref Guid iidProject, uint cookie, out IntPtr ppvProject, out int pfCanceled);
abstract member InitializeForOwner : string * string * string * uint32 * Guid * uint32 * nativeint * int -> int
Public Function InitializeForOwner (pszFilename As String, pszLocation As String, pszName As String, grfCreateFlags As UInteger, ByRef iidProject As Guid, cookie As UInteger, ByRef ppvProject As IntPtr, ByRef pfCanceled As Integer) As Integer

Parameters

pszFilename
String

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

pszLocation
String

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

pszName
String

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

grfCreateFlags
UInt32

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

iidProject
Guid

[in] Specifies iidProject.

cookie
UInt32

[in] Cookie identifying the owned project.

ppvProject
IntPtr

nativeint

[out] Specifies ppvProject.

pfCanceled
Int32

[out] Pointer to a flag indicating canceled.

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

Applies to