RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.VarBstrFromCy Variable

VarBstrFromCy is used to specify the function that makes the conversion from a currency value to a WideString.

Pascal
VarBstrFromCy: function(cyIn: Currency; LCID: Integer; dwFlags: Longint; out bstrOut: WideString): HRESULT;
C++
function(cyIn: Currency; LCID: Integer; dwFlags: Longint; out bstrOut: WideString): HRESULT VarBstrFromCy;

Use VarBstrFromCy to specify the function that makes the conversion from the currency value given through cyIn to the WideString stored in bstrOut. The LCID parameter is a locale identifier and dwFlags specifies the flags used in the conversion.  

The function stored in VarBstrFromCy returns the result of the conversion operation, which can be one of the following.

Value 
Meaning 
The conversion was successful. 
The variant type of the input parameter is not valid. 
The data stored in the output parameter does not fit in the destination type. 
The argument cannot be cast to the specified type. 
Either one of the arguments is invalid. 
There is not enough memory to complete the conversion. 

To make the inverse conversion, from a WideString to a currency value, use the function referenced by VarCyFromStr

 

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