Win32 API写入file()以附加文本 [英] win32 API write file() to append text

查看:156
本文介绍了Win32 API写入file()以附加文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个将错误消息写入文本文件的应用程序.

i'm writing an application where error messages are written into a text file.

文本文件是使用win32API createfile()函数创建的.

text file is created using win32API  createfile() function.

此后,每次发生错误时,都会使用writefile()API将消息写入文本文件.

after that everytime an error occurs the message is written into the text file with writefile() API.

但是每当写入新消息时,文件中的旧文本就会被覆盖.

but whenever a new message is written the old text in the file is getting overwritten.

我想在文件中文本的末尾附加新消息.

i want to append the new message at the end of the  text already in the file.

任何人都可以帮忙.

预先感谢

推荐答案

取消API内容并使用StreamWriter.
Scrap the API stuff and use a StreamWriter.


这篇关于Win32 API写入file()以附加文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆