IFX_UNLOAD_MODULE Function
The IFX_UNLOAD_MODULE function unloads the shared-object
file of a UDR written in the C language from shared memory.
IFX_UNLOAD_MODULE Function |--IFX_UNLOAD_MODULE--(--module_name--,--"C"--)-----------------|
Argument | Description | Restrictions | Syntax |
---|---|---|---|
module_name | Full pathname of file to unload | Shared-object file must exist and be unused. Pathname can be up to 255 bytes long. | Quoted String |
The IFX_UNLOAD_MODULE function is an owner-privileged function
whose owner is user informix. It returns an integer value to
indicate the status of the shared-object-file unload operation:
- Zero (0) to indicate success
- A negative integer to indicate an error.
The IFX_UNLOAD_MODULE function can only unload an unused shared-object file; that is, when no executing SQL statements (in any database) are using any UDRs in the specified shared-object file. If any UDR in the shared-object file is currently in use, then IFX_UNLOAD_MODULE raises an error.
On UNIX, for example, suppose
you want to unload the circle.so shared library, which contains
C UDRs. If this library resides in the /usr/apps/opaque_types directory,
you can use the following EXECUTE FUNCTION statement to execute the IFX_UNLOAD_MODULE function:
EXECUTE FUNCTION ifx_unload_module
(“/usr/apps/opaque_types/circle.so”, “C”);
On Windows, for example,
suppose you want to unload the circle.dll dynamic link library,
which contains C UDRs. If this library is in the C:\usr\apps\opaque_types directory,
you can use the following EXECUTE FUNCTION statement to execute the IFX_UNLOAD_MODULE function:
EXECUTE FUNCTION ifx_unload_module
(“C:\usr\apps\opaque_types\circle.dll”, “C”);
For more information about using the built-in IFX_REPLACE_MODULE( ) and IFX_UNLOAD_MODULE( ) UDR definition routines, see the HCL Informix® User-Defined Routines and Data Types Developer's Guide and the HCL Informix DataBlade API Programmer's Guide.