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
'宣告
Function GetDiscoverError ( _
cookie As Integer _
) As Integer
'用途
Dim instance As IDiscoverySession
Dim cookie As Integer
Dim returnValue As Integer
returnValue = instance.GetDiscoverError(cookie)
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
);
注意
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.