Freigeben über


IVsSolution.GetGuidOfProject Method

Returns the unique identifier for a project in the solution.

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

Syntax

'Declaration
Function GetGuidOfProject ( _
    pHierarchy As IVsHierarchy, _
    <OutAttribute> ByRef pguidProjectID As Guid _
) As Integer
'Usage
Dim instance As IVsSolution
Dim pHierarchy As IVsHierarchy
Dim pguidProjectID As Guid
Dim returnValue As Integer

returnValue = instance.GetGuidOfProject(pHierarchy, _
    pguidProjectID)
int GetGuidOfProject(
    IVsHierarchy pHierarchy,
    out Guid pguidProjectID
)
int GetGuidOfProject(
    [InAttribute] IVsHierarchy^ pHierarchy, 
    [OutAttribute] Guid% pguidProjectID
)
abstract GetGuidOfProject : 
        pHierarchy:IVsHierarchy * 
        pguidProjectID:Guid byref -> int 
function GetGuidOfProject(
    pHierarchy : IVsHierarchy, 
    pguidProjectID : Guid
) : int

Parameters

  • pguidProjectID
    Type: System.Guid%
    [out] Pointer to the unique identifier of 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 vsshell.idl:

HRESULT IVsSolution::GetGuidOfProject(
   [in] IVsHierarchy *pHierarchy,
   [out] GUID *pguidProjectID
);

Based on a project, this method returns the GUID for a project in a solution.

.NET Framework Security

See Also

Reference

IVsSolution Interface

IVsSolution Members

Microsoft.VisualStudio.Shell.Interop Namespace