RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Variants.VarResultCheck Function

Raises variant exception based on HRESULT value.

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

Variants

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. 

 

EVariantError

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!