RAD Studio VCL Reference
Variants.VarResultCheck Function

Raises variant exception based on HRESULT value.

procedure VarResultCheck(AResult: HRESULT); overload;
procedure VarResultCheck(AResult: HRESULT; ASourceType: TVarType; ADestType: TVarType); overload;
VarResultCheck(HRESULT AResult);
VarResultCheck(HRESULT AResult, TVarType ASourceType, TVarType ADestType);

VarResultCheck examines the HRESULT value returned by many variant routines. If AResult is S_OK, VarResultCheck does nothing. Otherwise, VarResultCheck attempts to map AResult to a variant exception and raise that exception. If VarResultCheck is unable to map AResult to a specific variant Exception, it raises EVariantError

Specify ASourceType and ADestType when the operation involves conversion between two variant types. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!