informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_fp_funcstate()

The mi_fp_funcstate() accessor function obtains user-state information for the user-defined routine from its associated MI_FPARAM structure.

Syntax

Usage

The mi_fp_funcstate() function obtains a pointer to the user-state information for the user-defined routine that is associated with the fparam_ptr MI_FPARAM structure. In the first invocation of the UDR, the database server sets the user-state pointer to NULL. Use the mi_fp_funcstate() function to return the user-state pointer so that you can access the state information within a UDR.

Cast this user-state pointer to match the structure of the user-defined buffer. For example, the following call to mi_fp_funcstate() casts the user-state pointer as a structure called udr_info and uses this pointer to access the count_fld of the udr_info structure:

Return Values

A user-state pointer is a pointer that references the user-state information in a user-defined buffer. Cast this pointer to match the structure of the user-state information.
NULL indicates that the user-state pointer is uninitialized. The user-state pointer has a NULL value the first time a UDR is invoked.

Related Topics

See the descriptions of the following functions: mi_fp_argisnull(), mi_fp_arglen(), mi_fp_argprec(), mi_fp_argscale(), mi_fp_argtype(), mi_fp_retlen(), mi_fp_retprec(), mi_fp_retscale(), mi_fp_rettype(), mi_fp_returnisnull(), and mi_fp_setfuncstate().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved