|
-
Apr 21st, 2003, 03:36 PM
#1
Thread Starter
Junior Member
Is it possible
OS NT VB 5.0
Is it possible to return an Array from a DLL(created with VB) to the Caller VB program. I can pass back variables but not the array ?
An example of the code will be grate.
Thanks
-
Apr 22nd, 2003, 06:42 AM
#2
I've never user VB5, but it can't be that different.
Try returning a Variant, or passing in an uninitialized array to be filled. That's the way I go anyway...
VB Code:
Private Function FillArray(arrRet() As String) As Boolean
'Redim the array and fill it. If the fill is successful,
'return True. If it is not successful, or an error is
'raised, return False.
End Function
Private Sub Form_Load()
Dim arrRet() As String
Dim x As Long
If FillArray(arrRet) Then
For x = LBound(arrRet) To UBound(arrRet)
Debug.Print arrRet(x)
Next
Else
MsgBox "Array Not Filled!"
End If
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 23rd, 2003, 10:01 AM
#3
Thread Starter
Junior Member
Passing the arway as empty works very well.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|