闲
闲清
Unregistered / Unconfirmed
GUEST, unregistred user!
这个dll是在VB里创建的:
dll的工程名为files32
类名为filesystem
定义的函数:
Public Function EnumFiles(ByRef dir As String) As String
Dim FO As FileSystemObject
Dim FD As Folder
Dim Result As String
On Error Resume Next
FO = New FileSystemObject
Set FD = FO.GetFolder(dir)
For Each thing In FD.Files
Result = Result &
thing.Name &
" "
Next
EnumFiles = Result
End Function
在一个新工程里引用该dll之后我是这样使用的:
dim fs as new files32.filesystem
dim str as string
str=fs.enumfiles("C:/")
可是str为空,函数没问题,我试过了,为什么会没有返回值?
我在Delphi里定义了该函数之后,运行时提示找不到enumfiles入口,是怎么回事?
dll的工程名为files32
类名为filesystem
定义的函数:
Public Function EnumFiles(ByRef dir As String) As String
Dim FO As FileSystemObject
Dim FD As Folder
Dim Result As String
On Error Resume Next
FO = New FileSystemObject
Set FD = FO.GetFolder(dir)
For Each thing In FD.Files
Result = Result &
thing.Name &
" "
Next
EnumFiles = Result
End Function
在一个新工程里引用该dll之后我是这样使用的:
dim fs as new files32.filesystem
dim str as string
str=fs.enumfiles("C:/")
可是str为空,函数没问题,我试过了,为什么会没有返回值?
我在Delphi里定义了该函数之后,运行时提示找不到enumfiles入口,是怎么回事?