Hello,
First put validation for all necessary place to validate the return value.
int iVal = sData.ReverseFind(_T('.'));
if(iVal>0)
{
iLen = iLen - iVal;
}
sData = sData.Left(iVal);
etc...
and u can debug the code step by step u will come know, where exactly exe is crashing, then your problem will be resolved.