|
-
February 19th, 2004, 05:13 AM
#1
CFileException not working in ReleaseMinDependecy Mode
hi
i have wriitern a windows nt service program. in this im reading a configuration file if the file is not present i will be wriiting the error into windows nt event log.
this is the code
if(fFile.Open(szFilePath,CFile::modeCreate|CFile::modeNoTruncate |CFile::modeReadWrite|CFile::shareDenyWrite))
{
fFile.SeekToEnd();
return TRUE;
}
else
{
CString szError,szLog;
char strerr[500];
fileException.GetErrorMessage(strerr,100);
szError.Format("Couldnt open the file %s please check the path ",szFilePath);
szLog=szError;
szLog+=strerr;
//event log
CServiceModule::LogEvent(_T(szLog),TPRSERVICE_ERROR,EVENTLOG_ERROR_TYPE);
}
the problem is the strerr variable is populated with error in debug mode but not in releasemindependency mode.
the length of strerr is returned as 0 in release mode and 24 in debug mode. i would like to know cause of this problem and appropriate remedy.
thanx in advance
regards
Aswin.N.Paranji
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|