TMemIniFile is what you need and should always be preferred over TIniFile. You choose whether or not to save the file.
What you cannot do directly is to initialize it from the resource, but it is not difficult to assemble it yourself.
- Use the resource stream to retrieve your resource.
- Create a list of strings and call loading the resource stream into the list of strings.
- Create a TMemIniFile and call SetStrings, passing a list of strings.
source share