次の方法で共有


IVsSolutionBuildManager2.AdviseUpdateSolutionEvents Method (IVsUpdateSolutionEvents, UInt32%)

Adds the caller to the list of listeners for IVsUpdateSolutionEvents2 events.

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

Syntax

'宣言
Function AdviseUpdateSolutionEvents ( _
    pIVsUpdateSolutionEvents As IVsUpdateSolutionEvents, _
    <OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'使用
Dim instance As IVsSolutionBuildManager2
Dim pIVsUpdateSolutionEvents As IVsUpdateSolutionEvents
Dim pdwCookie As UInteger
Dim returnValue As Integer

returnValue = instance.AdviseUpdateSolutionEvents(pIVsUpdateSolutionEvents, _
    pdwCookie)
int AdviseUpdateSolutionEvents(
    IVsUpdateSolutionEvents pIVsUpdateSolutionEvents,
    out uint pdwCookie
)
int AdviseUpdateSolutionEvents(
    [InAttribute] IVsUpdateSolutionEvents^ pIVsUpdateSolutionEvents, 
    [OutAttribute] unsigned int% pdwCookie
)
abstract AdviseUpdateSolutionEvents : 
        pIVsUpdateSolutionEvents:IVsUpdateSolutionEvents * 
        pdwCookie:uint32 byref -> int 
function AdviseUpdateSolutionEvents(
    pIVsUpdateSolutionEvents : IVsUpdateSolutionEvents, 
    pdwCookie : uint
) : int

Parameters

  • pdwCookie
    Type: System.UInt32%
    [out] Pointer to a double word containing the cookie.

Return Value

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

Implements

IVsSolutionBuildManager.AdviseUpdateSolutionEvents(IVsUpdateSolutionEvents, UInt32%)

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolutionBuildManager2::AdviseUpdateSolutionEvents(
   [in] IVsUpdateSolutionEvents *pIVsUpdateSolutionEvents,
   [out] VSCOOKIE *pdwCookie
);

Allows the caller to listen for the set of events that solution build manager fires from IVsUpdateSolutionEvents2. This interface contains the events set for solution and project building.

When this method is called, you pass in a pointer to your events object and a cookie is provided that can then be passed to the UnadviseUpdateSolutionEvents method to stop listening.

.NET Framework Security

See Also

Reference

IVsSolutionBuildManager2 Interface

IVsSolutionBuildManager2 Members

AdviseUpdateSolutionEvents Overload

Microsoft.VisualStudio.Shell.Interop Namespace