Ini_GetInt Returns Incorrect Values in LabWindows/CVIPrimary Software: LabWindows/CVI Development Systems>>Full Development SystemPrimary Software Version: N/A Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I created an INI file with several sections, each with several number fields. Whenever I use the Ini_GetInt method to retrieve these fields, the resulting value is always a very large/small, incorrect number. How can I read correct number values from my INI file? Solution: This error occurs when you specify an invalid section name (the second parameter to this function). The most common mistake is to include the square brackets around the text for this parameter. For example, if your INI files appears as follows: [section 1] field1 = 1 [section 2] field2 = 2 The correct syntax to retrieve field1 would be: Ini_GetInt(iniText, "section 1", "field1", &value); As opposed to: Ini_GetInt(iniText, "[section 1]", "field1", &value); Related Links: Attachments:
Report Date: 07/27/2007 Last Updated: 08/25/2007 Document ID: 4BQDD5SN |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
