Compartir a través de


IVsParentProject2.CreateNestedProject Method

Creates and adds a solution to a project.

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

Syntax

'Declaración
Function CreateNestedProject ( _
    itemidLoc As UInteger, _
    ByRef rguidProjectType As Guid, _
    lpszMoniker As String, _
    lpszLocation As String, _
    lpszName As String, _
    grfCreateFlags As UInteger, _
    ByRef rguidProjectID As Guid, _
    ByRef iidProject As Guid, _
    <OutAttribute> ByRef ppProject As IntPtr _
) As Integer
'Uso
Dim instance As IVsParentProject2
Dim itemidLoc As UInteger
Dim rguidProjectType As Guid
Dim lpszMoniker As String
Dim lpszLocation As String
Dim lpszName As String
Dim grfCreateFlags As UInteger
Dim rguidProjectID As Guid
Dim iidProject As Guid
Dim ppProject As IntPtr
Dim returnValue As Integer

returnValue = instance.CreateNestedProject(itemidLoc, _
    rguidProjectType, lpszMoniker, lpszLocation, _
    lpszName, grfCreateFlags, rguidProjectID, _
    iidProject, ppProject)
int CreateNestedProject(
    uint itemidLoc,
    ref Guid rguidProjectType,
    string lpszMoniker,
    string lpszLocation,
    string lpszName,
    uint grfCreateFlags,
    ref Guid rguidProjectID,
    ref Guid iidProject,
    out IntPtr ppProject
)
int CreateNestedProject(
    [InAttribute] unsigned int itemidLoc, 
    [InAttribute] Guid% rguidProjectType, 
    [InAttribute] String^ lpszMoniker, 
    [InAttribute] String^ lpszLocation, 
    [InAttribute] String^ lpszName, 
    [InAttribute] unsigned int grfCreateFlags, 
    [InAttribute] Guid% rguidProjectID, 
    [InAttribute] Guid% iidProject, 
    [OutAttribute] IntPtr% ppProject
)
abstract CreateNestedProject : 
        itemidLoc:uint32 * 
        rguidProjectType:Guid byref * 
        lpszMoniker:string * 
        lpszLocation:string * 
        lpszName:string * 
        grfCreateFlags:uint32 * 
        rguidProjectID:Guid byref * 
        iidProject:Guid byref * 
        ppProject:IntPtr byref -> int 
function CreateNestedProject(
    itemidLoc : uint, 
    rguidProjectType : Guid, 
    lpszMoniker : String, 
    lpszLocation : String, 
    lpszName : String, 
    grfCreateFlags : uint, 
    rguidProjectID : Guid, 
    iidProject : Guid, 
    ppProject : IntPtr
) : int

Parameters

  • itemidLoc
    Type: System.UInt32
    [in] The item id (VSITEMID) of the item to add.
  • rguidProjectType
    Type: System.Guid%
    [in] The GUID of the project to add.
  • lpszMoniker
    Type: System.String
    [in] String containing the moniker of the project item.
  • lpszLocation
    Type: System.String
    [in] String containing the full path to the project.
  • lpszName
    Type: System.String
    [in] String containing project name.
  • grfCreateFlags
    Type: System.UInt32
    [in] Bit flags specifying creation options for the project. Constructed using values from the __VSCREATEPROJFLAGS enumeration.
  • rguidProjectID
    Type: System.Guid%
    [in] The IID of the interface to create. Use IID_IUnknown for a generic IUnknown interface. You can also use IID_IVsHierarchy to get back a hierarchy interface.
  • iidProject
    Type: System.Guid%
    [in] The item id (VSITEMID) of the item to add.
  • ppProject
    Type: System.IntPtr%
    [out] Pointer to the created interface for the project.

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

HRESULT IVsParentProject2::CreateNestedProject(
   [in] VSITEMID itemidLoc, 
   [in] REFGUID rguidProjectType, 
   [in] LPCOLESTR lpszMoniker, 
   [in] LPCOLESTR lpszLocation, 
   [in] LPCOLESTR lpszName, 
   [in] VSCREATEPROJFLAGS grfCreateFlags, 
   [in] REFIID iidProject, 
   [out, iid_is(iidProject)] void **ppProject
);

.NET Framework Security

See Also

Reference

IVsParentProject2 Interface

IVsParentProject2 Members

Microsoft.VisualStudio.Shell.Interop Namespace