Ini_WriteToRegistry
- Updated2023-02-21
- 2 minute(s) read
int Ini_WriteToRegistry (IniText handle, int rootKey, const char subkeyName[]);
Purpose
Writes the tag/value pairs in the list identified by handle to the specified Windows Registry Key. All values are written out as strings.
If you want to write the data to a destination other than a file or the Windows Registry, use the Ini_WriteGeneric function.
Parameters
| Input | ||||
| Name | Type | Description | ||
| handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. | ||
| rootKey | int | The Root Key in the Registry to write to. The available Root Keys are:
HKEY_CLASSES_ROOT
|
||
| subkeyName | const char [] | A NULL-terminated string containing the name of the Registry Subkey to which to write tag/value pairs. The Subkey should be '\' separated and relative to the specified Root Key. The following is an example of a valid Subkey string for the Root Key HKEY_CURRENT_USER: "Software\\National Instruments\\CVI\\5.0" CVI stores its configuration under this subkey. Do not store your program's information under this key. Use the following convention to name the subkey under which to store your program's information: "Software\\Company Name\\Program Name\\Program Version" |
||
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. 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 5.5 and later
