GetPrivateProfileString/WritePrivateProfileString

Learned a hard lesson. Contention between GetPrivateProfileString and WritePrivateProfileString may cause a deadlock, even for multiple processes. If you intent to Read/Write the same ini file, you have to lock the file yourself.

Yes, I know they are marked as deprecated. But they are really handy when you only have small settings. I don't want to use the registry for everything.

So wish the OS can make it thread safe.