Ini_WriteGeneric
- Updated2023-02-21
- 2 minute(s) read
int Ini_WriteGeneric (IniText handle, Ini_OutputFunc outputFunction, void *outputDestination);
Purpose
Writes the tag/value pairs in the list identified by handle to the specified outputDestination by calling the specified outputFunction.
This function allows you to write the in-memory contents to any destination, such as a memory mapped file or a TCP/IP address.
If you want to write to a disk file, you can use the function Ini_WriteToFile.
Parameters
| Input | ||||
| Name | Type | Description | ||
| handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. | ||
| outputFunction | Ini_OutputFunc | A pointer to a callback function that is called to write out each line of the IniText. The prototype for the callback function is: int CVICALLBACK OutputFunc(void *outputDest, char *outputString); The callback function should return 0 if it successfully writes the outputString parameter. Otherwise, it should return a negative error code, which is then returned by Ini_WriteGeneric.Each call to the function represents one line. It is the responsibility of the function to mark the end of the line in a manner appropriate to the destination type. |
||
| outputDestination | void * | A value representing the output destination. This value is passed to the specified output function.
|
||
Return Value
| Name | Type | Description | ||||||||||||||||||
| status | int | Indicates whether the function was successful. A zero indicates success. A negative value indicates an error. If the value is from –1 to –999, it is one of the error values defined in userint.h. If the value is from –5000 to –5999, it is one of the error values defined in toolbox.h. If the specified output function returns a negative value, the value is returned by Ini_WriteGeneric. Among the more commonly encountered errors are:
|
Additional Information
Library: Reading/Writing .ini-Style Files
Include file: toolbox\inifile.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later
