The mi_lo_stat( ) function performs the following tasks:
The mi_lo_stat( ) function is the constructor for the LO-status structure. The third argument to the mi_lo_stat( ) function indicates whether to create a new LO-status structure:
An LO-status pointer that does not point to NULL allows a DataBlade API module to reuse an LO-status structure.
For example, the code fragment in Figure 31 uses the mi_lo_stat( ) function to allocate memory for the LO-status structure only when the first_time flag is true.
MI_CONNECTION *conn; MI_LO_HANDLE *LO_hdl; MI_LO_STAT *LO_stat; MI_LO_FD LO_fd; mi_integer first_time; ... LO_fd = mi_lo_open(conn, LO_hdl, MI_LO_RDONLY); if ( first_time ) { ... LO_stat = NULL; /* tell interface to allocate memory */ first_time = 0; /* set "first_time" flag to false */ ... } err = mi_lo_stat(conn, LO_fd, &LO_stat);
Once mi_lo_stat( ) has a pointer to a valid LO-status structure, it fills this structure with the status information for the open smart large object. You pass an LO file descriptor of the open smart large object as an argument to the mi_lo_stat( ) function.
After the execution of mi_lo_stat( ) in Figure 31, the LO_stat variable points to an allocated LO-status structure that contains status information for the smart large object that the LO file descriptor, LO_fd, identifies.
For more information, see Table 42. For the syntax of the mi_lo_stat( ) function, see the IBM Informix: DataBlade API Function Reference.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]