共用方式為


IVsSolutionLoadManager.OnBeforeOpenProject Method

Fired before each project is opened.

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

Syntax

'宣告
Function OnBeforeOpenProject ( _
    ByRef guidProjectID As Guid, _
    ByRef guidProjectType As Guid, _
    pszFileName As String, _
    pSLMgrSupport As IVsSolutionLoadManagerSupport _
) As Integer
'用途
Dim instance As IVsSolutionLoadManager
Dim guidProjectID As Guid
Dim guidProjectType As Guid
Dim pszFileName As String
Dim pSLMgrSupport As IVsSolutionLoadManagerSupport
Dim returnValue As Integer

returnValue = instance.OnBeforeOpenProject(guidProjectID, _
    guidProjectType, pszFileName, pSLMgrSupport)
int OnBeforeOpenProject(
    ref Guid guidProjectID,
    ref Guid guidProjectType,
    string pszFileName,
    IVsSolutionLoadManagerSupport pSLMgrSupport
)
int OnBeforeOpenProject(
    [InAttribute] Guid% guidProjectID, 
    [InAttribute] Guid% guidProjectType, 
    [InAttribute] String^ pszFileName, 
    [InAttribute] IVsSolutionLoadManagerSupport^ pSLMgrSupport
)
abstract OnBeforeOpenProject : 
        guidProjectID:Guid byref * 
        guidProjectType:Guid byref * 
        pszFileName:string * 
        pSLMgrSupport:IVsSolutionLoadManagerSupport -> int 
function OnBeforeOpenProject(
    guidProjectID : Guid, 
    guidProjectType : Guid, 
    pszFileName : String, 
    pSLMgrSupport : IVsSolutionLoadManagerSupport
) : int

Parameters

  • guidProjectID
    Type: System.Guid%
    The GUID of the individual project to be opened.
  • guidProjectType
    Type: System.Guid%
    The GUID of the type of project to be opened (e.g. Visual Basic or C#).

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Typically a solution load manager uses this method to set project load priority by calling SetProjectLoadPriority.

.NET Framework Security

See Also

Reference

IVsSolutionLoadManager Interface

IVsSolutionLoadManager Members

Microsoft.VisualStudio.Shell.Interop Namespace