Share via


IDiscoverySession.GetDiscoverError Method

Retrieves the exception if NotifyDiscoverComplete method takes in cookie = nulla null reference (Nothing in Visual Basic).

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

Syntax

'Declaration
Function GetDiscoverError ( _
    cookie As Integer _
) As Integer
int GetDiscoverError(
    int cookie
)
int GetDiscoverError(
    [InAttribute] int cookie
)
abstract GetDiscoverError : 
        cookie:int -> int
function GetDiscoverError(
    cookie : int
) : int

Parameters

  • cookie
    Type: System.Int32

    [in] Identifies the URL of the file that is being discovered.

Return Value

Type: System.Int32

Two return values are possible:

  • S_OK: No error info available. The error info was erased. To prevent this from happening, call GetDiscoveryError in your NotifyDiscoverComplete code.

  • Other: This method will throw the exception caught in discovery, so HRESULT won't be S_OK.

Remarks

COM Signature

From discoveryservice.idl:

HRESULT IDiscoverySession::GetDiscoverError(
   [in] int cookie
);

Note

The error information from NotifyDiscoverComplete method is not available if cookie is set to nulla null reference (Nothing in Visual Basic). To prevent this, call GetDiscoveryError in your NotifyDiscoverComplete implementation.

.NET Framework Security

See Also

Reference

IDiscoverySession Interface

Microsoft.VisualStudio.Shell.Interop Namespace