Freigeben über


IDiscoverySession.GetDiscoverError(Int32) Method

Definition

Retrieves the exception if NotifyDiscoverComplete(Int32, IDiscoveryResult) method takes in cookie = null.

public:
 int GetDiscoverError(int cookie);
public:
 int GetDiscoverError(int cookie);
int GetDiscoverError(int cookie);
public int GetDiscoverError (int cookie);
abstract member GetDiscoverError : int -> int
Public Function GetDiscoverError (cookie As Integer) As Integer

Parameters

cookie
Int32

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

Returns

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(Int32, IDiscoveryResult) 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 null. To prevent this, call GetDiscoveryError in your NotifyDiscoverComplete implementation.

Applies to