System.Variants.VarResultCheck
Delphi
procedure VarResultCheck(AResult: HRESULT); overload;
procedure VarResultCheck(AResult: HRESULT; ASourceType, ADestType: TVarType); overload;
C++
extern DELPHI_PACKAGE void __fastcall VarResultCheck(HRESULT AResult)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Variants.pas System.Variants.hpp |
System.Variants | System.Variants |
Description
Raises variant exception based on HRESULT value.
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.