I need to be able to reopen a file that already has handle open. I used Creatfile to open a text file and read it no problem....but I need to be able to reopen the file for writing without dropping the handling. if I drop the handle another function that is polling the file will grab it. I've tried to initially open the file with the FILE_SHARE_WRITE
attribute but this won't work. Is there anyway to Erase the file and move the file pointer back to the beginning without dropping the handle?
Here's a bit of the code that won't work
short int WriteFile(HANDLE *FHandle,char *buffer,CString ,*Filename,unsigned int *towrite)
//CloseHandle(*FHandle); in order for this to work I have to close thishandle
newhandle = CreateFile(*Filename,
if ((newhandle) != (INVALID_HANDLE_VALUE))
if ((Closep) /*&& (Closec=)*/ )