Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long 是API函数,要声明的
dim objfso as object set objfso=createobject("scripting.filesystemobject") objfso.createfile "c:\a.txt" ~~~~~~~~~CreateTextFile
声明之后也还是不能直接用啊 我试过拉,参数中lpSecurityAttributes As SECURITY_ATTRIBUTES 这里会提示错误的
set objfso=createobject("scripting.filesystemobject")
objfso.createfile "c:\a.txt"
楼主说得createfile是API函数
但是我测试的时候,这个函数有一个参数是一个结构该如何调用呢?
是API函数,要声明的
set objfso=createobject("scripting.filesystemobject")
objfso.createfile "c:\a.txt"
~~~~~~~~~CreateTextFile
我试过拉,参数中lpSecurityAttributes As SECURITY_ATTRIBUTES
这里会提示错误的