DeleteFile() not working in my VC.NET app
Hi, this snippet is from a VC.NET app:
Code:
.....
.....
int i = m_clistboxreslist.FindString(0,dat);
m_clistboxreslist.DeleteString(i);
if(::DeleteFile(srcfile))
AfxMessageBox("Deleted");
else
AfxMessageBox("Falied");
RecreateListTxt();//dump data to file
......
......
The problem is that DeleteFunction() ain't working. 'srcfile' is a valied file path (and DeleteFile(srcfile) works when i put it in a win32console app). Here the execution pointer jumps to the else statement, but then again, AfxMessageBox() is also not working. Why is this?
any help.