If that's all of your code, how can you tell if it read the value?
I would suggest either using the debugger, or sprinkling some MessageBox calls in to see what values your program uses. In particular, ensure the ini file is where your code is looking (TARGETDIR + "SampleSetup.ini"
should likely be TARGETDIR ^ "SampleSetup.ini"
instead), check the return code from GetProfString
, and see what szItemName
is after the call.