IVsAsyncEnumCallback.OnDataAvailable Method

Event fired when data is available without blocking.

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

Syntax

'Declaration
Function OnDataAvailable ( _
    cElementsAvailable As UInteger, _
    fIsComplete As Integer, _
    ulProgressCurrent As UInteger, _
    ulProgressMax As UInteger _
) As Integer
'Usage
Dim instance As IVsAsyncEnumCallback 
Dim cElementsAvailable As UInteger 
Dim fIsComplete As Integer 
Dim ulProgressCurrent As UInteger 
Dim ulProgressMax As UInteger 
Dim returnValue As Integer 

returnValue = instance.OnDataAvailable(cElementsAvailable, _
    fIsComplete, ulProgressCurrent, _
    ulProgressMax)
int OnDataAvailable(
    uint cElementsAvailable,
    int fIsComplete,
    uint ulProgressCurrent,
    uint ulProgressMax
)
int OnDataAvailable(
    [InAttribute] unsigned int cElementsAvailable, 
    [InAttribute] int fIsComplete, 
    [InAttribute] unsigned int ulProgressCurrent, 
    [InAttribute] unsigned int ulProgressMax
)
function OnDataAvailable(
    cElementsAvailable : uint, 
    fIsComplete : int, 
    ulProgressCurrent : uint, 
    ulProgressMax : uint
) : int

Parameters

  • cElementsAvailable
    Type: System.UInt32

    [in] Number of elements available to the consumer.

  • fIsComplete
    Type: System.Int32

    [in] A Boolean parameter indicating completion (true) of the event.

  • ulProgressCurrent
    Type: System.UInt32

    [in] Progress counter of elements served.

  • ulProgressMax
    Type: System.UInt32

    [in] Maximum number of elements available.

Return Value

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

Remarks

The enumerator's behavior remains inherently synchronous, but as data is available without blocking OnDataAvailable() events are fired.

cElementsAvailable is always a delta. Pure progress information may be conveyed by the enumerator by passing 0 for cElementsAvailable and revised values for ulProgressCurrent and ulProgressMax.

COM Signature

From vsshell.idl:

HRESULT IVsAsyncEnumCallback::OnDataAvailable(
   [in] ULONG cElementsAvailable, 
   [in] BOOL fIsComplete, 
   [in] ULONG ulProgressCurrent, 
   [in] ULONG ulProgressMax
);

.NET Framework Security

See Also

Reference

IVsAsyncEnumCallback Interface

IVsAsyncEnumCallback Members

Microsoft.VisualStudio.Shell.Interop Namespace