2017新款女装夏装半袖:WriteFile 利用vb api函数 写文件操作?

来源:百度文库 编辑:高校问答 时间:2024/04/20 03:07:56
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函数 写入文件的例子,谢谢!