conn
is a pointer to the connection descriptor that a previous call to mi_open() or mi_server_connect() established.
LOhdl_dptr
is a doubly indirected pointer to the LO handle that identifies the new smart large object. This smart large object is where mi_lo_expand() copies the file data.
fname_spec
is the full pathname to the operating-system file to copy into a smart large object.
flags
is an integer that is a bitmask to indicate how to open the operating-system file and where this file is located.
offset
is the point to begin the read in the operating-system file. The offset value is the number of bytes from the beginning of the file, starting at 0.
0
amount
is the amount of data to read from the operating-system file, starting at the offset. An amount value of -1 means read to the end of the file.
-1
LO_spec
is a pointer to an LO-specification structure that contains the storage characteristics of the new smart large object.
Yes
1. It obtains an LO handle for the new smart large object and assigns a pointer to the handle to the argument that LOhdl_dptr references.
2. It assigns the storage characteristics from the LO-specification structure, LO_spec, to the new smart large object.
3. It opens the new smart large object in read/write access mode (MI_LO_RDWR).
4. It copies the contents of the operating-system file whose name is in the fname_spec buffer into the new smart large object that *LOhdl_dptr references.
5. It returns an LO file descriptor that identifies the new smart large object and is positioned at the start of this smart large object.
MI_O_EXCL
Open the file only if fname_spec does not exist.
MI_O_TRUNC
Zero out the input file before reading it.
MI_O_APPEND
Allow appending to the end of the file. (This function does not write to the source file.)
MI_O_RDWR
Open the file in read/write mode. (This function does not write to the source file.)
MI_O_RDONLY
Open the file in read-only mode.
MI_O_TEXT
Process the file as text (not binary).
MI_O_SERVER_FILE
The fname_spec file is on the server computer.
MI_O_CLIENT_FILE
The fname_spec file is on the client computer.
Important: The MI_O_TRUNC flag is valid but is not often useful in a DataBlade routine. The default flags value is:
An MI_LO_FD
The LO file descriptor of the open smart large object that LOhdl_dptr references. The function also initializes the LO handle that LOhdl_dptr references.
MI_ERROR
The function was not successful.