i want to add some data to a txt file and i use CreateFile() and OPEN_EXISTING to do so
but it will add the data at the beginning of the file , i want to add the data do the end of the file
how can i do that with CreateFile()? or i cant ? any alternative ways to add data at the end of file?
heres my code
Code:hFile = CreateFile(_T("C:\\test.txt"),GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); WriteFile(hFile, lpFile_Data, dwFileSize , &dwBytesWritten, NULL);




Reply With Quote