IDiscoverySession::GetDiscoverError Method (Int32)

 

Retrieves the exception if NotifyDiscoverComplete method takes in cookie = null.

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

int GetDiscoverError(
	int cookie
)

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.

From discoveryservice.idl:

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

The error information from NotifyDiscoverComplete method is not available if cookie is set to null. To prevent this, call GetDiscoveryError in your NotifyDiscoverComplete implementation.

Return to top
Show: