[RESOLVED] Adding data to file with CreateFile()
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);
Re: Adding data to file with CreateFile()
See the example from this article, in the community content section.
http://msdn.microsoft.com/en-us/libr...47(VS.85).aspx
Regards
Re: Adding data to file with CreateFile()
thank you , exactly what i needed!