The ITEssential interface

ITEssential is the base class of the value interface classes. The ITEssential class is equivalent to the COM IUnknown interface of Microsoft™ and is abstract.

This interface provides the following methods.
Method Description
ITOpErrorCode QueryInterface(const ITInterfaceIID &ifiid, void **resultif) Fills the parameter resultif with the address (or location) of the requested interface class. If the requested interface is not supported then the parameter is set to NULL.One of the following values is returned in ITOpErrorCode:
  • IT_QUERYINTERFACE_FAILED-if the requested interface is not supported.
  • IT_QUERYINTERFACE_SUCCESS-if the requested interface is successfully obtained.

When the interface is no longer needed, it must be released by calling the Release() member function of ITEssential.

unsigned long AddRef() Increments the reference count on this value object.
unsigned long Release() Decrements the reference count on this value object. When the count reaches 0, the object might be freed, depending on the implementation of the value object.
The following definitions apply to the arguments and return values of the ITEssential interface and its descendants.
  • ITInterfaceID is an index that identifies a particular value interface.
  • ITOpErrorCode is a code returned from an interface method such as ITEssential::QueryInterface
  • ITOpErrorCode indicates success or failure of a method. It is defined to be of the type long and can be assigned either the value IT_QUERYINTERFACE_SUCCESS or IT_QUERYINTERFACE_FAILED. The inline function ITIIDtoSID maps ITInterfaceIDs to integral representations suitable for use in a switch statement.

By using the macros provided in the manner shown in the examples, value object implementors and application developers are protected from incompatibility with future versions of the interface.

Every interface defined by HCL Informix® has been given a unique interface identifier. These interface identifiers have an IID suffix, for example, ITEssentialIID.

The identifiers defined by the value interfaces are:
  • ITContainCvtIID
  • ITContainerIID
  • ITConversionsIID
  • ITDateTimeIID
  • ITDatumIID
  • ITErrorInfoIID
  • ITEssentialIID
  • ITLargeObjectIID
  • ITRowIID
  • ITSetIID
  • ITValueIID

For details about the semantics of ITEssential when an object is delegated, see Object Containment and Delegation.