I have the following line of code in my application:
CString strAppName = AfxGetAppName();
Sometimes it fills strAppName up with garbage characters, and I can’t figure out why.
Anyone have any ideas?
TIA.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is possible if you change
m_pszAppNamemanually.You could add data breakpoint on m_lpszCurrentAppName and on
m_pszAppName. It is initialized in<...>\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc\appinit.cppfile. You’ll see what is going on with that variable and who’s trying to change it.