Partager via


IVsSolution2.GetProjectFactory Method (UInt32, Guid%, String, IVsProjectFactory%)

Returns a project factory.

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

Syntax

'Déclaration
Function GetProjectFactory ( _
    dwReserved As UInteger, _
    <OutAttribute> ByRef pguidProjectType As Guid, _
    pszMkProject As String, _
    <OutAttribute> ByRef ppProjectFactory As IVsProjectFactory _
) As Integer
'Utilisation
Dim instance As IVsSolution2
Dim dwReserved As UInteger
Dim pguidProjectType As Guid
Dim pszMkProject As String
Dim ppProjectFactory As IVsProjectFactory
Dim returnValue As Integer

returnValue = instance.GetProjectFactory(dwReserved, _
    pguidProjectType, pszMkProject, _
    ppProjectFactory)
int GetProjectFactory(
    uint dwReserved,
    out Guid pguidProjectType,
    string pszMkProject,
    out IVsProjectFactory ppProjectFactory
)
int GetProjectFactory(
    [InAttribute] unsigned int dwReserved, 
    [InAttribute] [OutAttribute] Guid% pguidProjectType, 
    [InAttribute] String^ pszMkProject, 
    [OutAttribute] IVsProjectFactory^% ppProjectFactory
)
abstract GetProjectFactory : 
        dwReserved:uint32 * 
        pguidProjectType:Guid byref * 
        pszMkProject:string * 
        ppProjectFactory:IVsProjectFactory byref -> int 
function GetProjectFactory(
    dwReserved : uint, 
    pguidProjectType : Guid, 
    pszMkProject : String, 
    ppProjectFactory : IVsProjectFactory
) : int

Parameters

  • pguidProjectType
    Type: System.Guid%
    [in, out] Unique identifier (GUID) of the project type. This parameter can be nulla null reference (Nothing in Visual Basic) if a value is specified for pszMkProject.
  • pszMkProject
    Type: System.String
    [in] Path to the project. This parameter can be nulla null reference (Nothing in Visual Basic) if a value is specified for pguidProjectType.

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

HRESULT IVsSolution2::GetProjectFactory(
   [in] DWORD dwReserved, 
   [in, out] GUID *pguidProjectType, 
   [in] LPCOLESTR pszMkProject, 
   [out, retval] IVsProjectFactory **ppProjectFactory
);

Use this method to determine the project factory from the project reference.

.NET Framework Security

See Also

Reference

IVsSolution2 Interface

IVsSolution2 Members

GetProjectFactory Overload

Microsoft.VisualStudio.Shell.Interop Namespace