I don't know if this is the problem, but this is a kind of very big problem. You have declared your File Data as LPWIN32_FIND_DATA, which actually is a pointer to such a WIN32_FIND_DATA structure. So you have a pointer but you do not have a valid OBJECT to which this pointer to point. So try declaring you file data structure like this:

WIN32_FIND_DATA fd;

and then give its address to the FindFirstFile function like this:

fh = FindFirstFile(delpath,&fd);

try it out this way I do not see more problems at a first glance