COleCurrency::GetStatus

CurrencyStatus GetStatus( ) const;

Return Value

Returns the status of this COleCurrency value.

Remarks

Call this member function to get the status (validity) of a given COleCurrency object.

The return value is defined by the CurrencyStatus enumerated type which is defined within the COleCurrency class.

enum CurrencyStatus{
   valid = 0,
   invalid = 1,
   null = 2,
};

For a brief description of these status values, see the following list:

The status of a COleCurrency object is invalid in the following cases:

For more information on operations that may set the status to invalid, see the following member functions:

Example

// even an empty COleCurrency is valid
COleCurrency cy;
ASSERT(cy.GetStatus() == COleCurrency::valid);

// always valid after being set
cy.SetCurrency(4, 500);
ASSERT(cy.GetStatus() == COleCurrency::valid);

// some conversions aren't possible and will
// cause an invalid state, like this:
CByteArray array;
COleVariant varBogus(array);
cy = varBogus;
ASSERT(cy.GetStatus() == COleCurrency::invalid);

COleCurrency OverviewClass MembersHierarchy Chart

See Also   COleCurrency::SetStatus, COleCurrency::m_status