BOOL FindAndReplaceStr(TCHAR * dest,TCHAR * findStr,TCHAR *replaceStr)
{
TCHAR *pfirst = NULL;
int tmp_len=wcslen(dest);
TCHAR pdest[MAX_PATH]={0};
wcscat_s(pdest, MAX_PATH, dest);
pfirst=wcswcs(dest,findStr);
{
TCHAR *pfirst = NULL;
int tmp_len=wcslen(dest);
TCHAR pdest[MAX_PATH]={0};
wcscat_s(pdest, MAX_PATH, dest);
pfirst=wcswcs(dest,findStr);
if(pfirst== NULL)
{
return FALSE;
}
wcsncpy_s(pdest,tmp_len,dest,(pfirst-dest));
wcsncpy_s(pdest,tmp_len,dest,(pfirst-dest));
wcscat_s(pdest, MAX_PATH, replaceStr);
pfirst=pfirst+wcslen(findStr);
wcscat_s(pdest, MAX_PATH, pfirst);
memset(dest,'\0',tmp_len);
wcscpy_s(dest, MAX_PATH, pdest);
pfirst=pfirst+wcslen(findStr);
wcscat_s(pdest, MAX_PATH, pfirst);
memset(dest,'\0',tmp_len);
wcscpy_s(dest, MAX_PATH, pdest);
return TRUE;
}
}