I'm trying to write a program using Microsofts Embedded visual tools for Windows CE. This program needs to use a .ini file to load preferences. GetPrivateProfile... and SetPrivateProfile.... functions are not available. I am trying to use CWinApp and setting the m_pszProfileName. But, I do not know what to set this to. Is it just the .ini file name or can it include the path name too? Does the .ini file have to be in the same directory as the executable (or the pwd)? My code looks something like this:

CWinApp *App = AfxGetApp();

LPCTSTR IniFilename = _T("default.ini");

free((void*)App->m_pszProfileName);

App->m_pszProfileName = _tcsdup(IniFilename);

LPCTSTR MyString= App->GetProfileString(_T("SECTION"),_T("VALUE") );









Is it possible that I set up the .ini file wrong? I'm very confused. Any help would be greatly appreciated.