18.08.2015, 14:31
Add this line
Compare the handle id with
Also note that CreateINI fails if the file already exists or you ran out of handles.
By default you can have a maximum of 2 active handles. You need to close the previous handle to make a free handle.
You can increase the number of handles by redefining INI_MAX_MULTI_FILES
Note that increasing this number means increasing your heap size (increase the RAM Memory consumption).
Код:
printf("Handle ID:%d",_:handle);
Код:
#define INI_ERR_FAILED_TO_OPEN -1 #define INI_ERR_FILE_DOES_NOT_EXIST -2 #define INI_ERR_FILE_ALREADY_EXISTS -3 #define INI_ERR_FILE_CREATION_FAILED -4 #define INI_ERR_MAX_FILE_LIMIT -5 #define INI_ERR_INVALID_HANDLE -6 #define INI_ERR_SYNTAX -7 #define INI_ERR_INVALID_ID -8 #define INI_ERR_INVALID_BOOL -9 #define INI_ERR_PARSING_FAILED -17 #define INI_SECTION_NOT_FOUND -10 #define INI_KEY_CREATE_FAILED -11 #define INI_SECTION_CREATED -12 #define INI_SECTION_CREATE_FAILED -13 #define INI_KEY_CREATED -14 #define INI_KEY_NOT_FOUND -15 #define INI_KEY_FOUND -16
By default you can have a maximum of 2 active handles. You need to close the previous handle to make a free handle.
You can increase the number of handles by redefining INI_MAX_MULTI_FILES
Код:
#define INI_MAX_MULTI_FILES 128 //Your number of handles