军歌嘹亮电视剧在线看:WriteFile 利用vb api函数 写文件操作?

来源:百度文库 编辑:神马品牌网 时间:2024/05/16 11:07:32
str1 = "C:\Documents and Settings\hgl\桌面\test\test.txt" '打开文件

h2 = lopen(str1, read_write) '打开文件
If h2 = -1 Then
Exit Sub
End If
Dim h3 As Long
str = "abc"
com1 = Len(str)
h3 = WriteFile(h2, str, com1, 0, 0) '为什么这里写入不成功????

CloseHandle (h2)

麻烦网友提供1份完整利用vb api writefile函数 写入文件的例子,谢谢!