You didn't allocate any space for pResult.
I assume 255 is the maximum length of the resulting string (I'm not familiar with GetPrivateProfileString()). If so do this:
Code:
char pResult[255]; // maybe 256 if GetPrivateProfileString expects you to make room for '\0'
GetPrivateProfileString(m_strSectionName, m_strKeyName, "", pResult, 255, m_strFileName);
or this:
Code:
char* pResult = new char[255];
GetPrivateProfileString(m_strSectionName, m_strKeyName, "", pResult, 255, m_strFileName);
// use pResult ...
delete [] pResult;