INFORMIX
DataBlade API Programmer's Manual
Chapter 12: DataBlade API Function Descriptions
Home Contents Index Master Index New Book

mi_lo_stat()

The mi_lo_stat() function returns information about the current status of an open smart large object.

Syntax

Usage

The mi_lo_stat() function is the constructor for the LO-status structure. It performs the following steps to initialize an LO-status structure:

    1. It handles memory allocation for an LO-status structure.

    When the *LOstat_dptr value (a single indirect pointer to an LO-status structure) is NULL, the mi_lo_stat() function allocates an LO-status structure. Before you use an LO-status structure, set *LOstat_dptr to NULL so that mi_lo_stat() allocates space for the LO-status structure. When *LOstat_dptr does not point to NULL, the mi_lo_stat() function assumes that the LO-status structure has already been allocated via a previous call to mi_lo_stat().

    2. It initializes the fields in the LO-status structure with the status information for the smart large object that the LO_fd file descriptor identifies.

Important: You must call the mi_lo_stat() function before you use an LO-status structure in a DataBlade routine.

Do not use system memory-allocation calls (such as malloc() or mi_alloc()) to perform memory management for LO-status structures. Use the mi_lo_stat() function to allocate a new LO-specification structure and the mi_lo_stat_free() function to deallocate an LO-specification structure.

Tip: The mi_lo_stat() function replaces the mi_large_object_stat() function, which Informix supports for backward compatibility only. Use mi_lo_stat() for all new DataBlade routines.

Return Values

MI_OK

The function was successful.

MI_ERROR

The function was not successful.

Related Topics

See the descriptions of the following functions: mi_lo_stat_atime(), mi_lo_stat_cspec(), mi_lo_stat_ctime(), mi_lo_stat_free(), mi_lo_stat_mtime_sec(), mi_lo_stat_mtime_usec(), mi_lo_stat_refcnt(), and mi_lo_stat_size().

In Chapter 3, "Handling Smart Large Objects," see "Status Information", "The LO-Status Structure", and "Obtaining the Status of a Smart Large Object".




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.