Just a remark about performance with ini file :
personnally, i am still using ReadProfileString but if i know the file to read is on a network share (like netlogon), i copy the file in a temporary local file and all following actions are done on the local file.
Why i do like that ?
the windows api is quite efficient but it is a monolithic operation. The ini file is read in memory, list of section, list of keyword or values are read and then, the file is closed and memory freed.
when this is done on a local file, the first time, the file is loaded in the local disk cache and next actions are done with the copy in the cache. This is very fast.
When the same thing is done on a network file, there is no cache. for each action, the all file is read through the network. Even if the network is very fast, this is slower than a local read.
Suppose you have to read 10 sections with 10 keys in a 10 kb file.
- locally, you read 10kb one time on disk
- from the network, you read 10 x 10 x 10kb (1 Mb). This is much more slower !!!
initially, in my login script, i read network file. it was really slow specially for WAN workstation. When i changed the script to create a temporay local file and, performances increased significantly.
_________________________
Christophe