How do you write a dll that passes back an Array?

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

How do you write a dll that passes back an array.

'For example I create a Recordsset.
Colum A
Value1
Value2
Value3
'Create Array
Dim MyArray(2) as sring
'Assign values
MyArray(0) = ...field("Value1")
MyArray(1) = ...field("Value2")
MyArray(0) = ...field("Value3")

now I want to return all values.... What is the class structure for this...
 
Peter said:
How do you write a dll that passes back an array.

'For example I create a Recordsset.
Colum A
Value1
Value2
Value3
'Create Array
Dim MyArray(2) as sring
'Assign values
MyArray(0) = ...field("Value1")
MyArray(1) = ...field("Value2")
MyArray(0) = ...field("Value3")

now I want to return all values.... What is the class structure for
this...

"class structure"?

Declare the member type "As String()", e.g.

public function test() As String()

'...
return MyArray
end function


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
* (e-mail address removed) (Peter) scripsit:
How do you write a dll that passes back an array.

'For example I create a Recordsset.
Colum A
Value1
Value2
Value3
'Create Array
Dim MyArray(2) as sring
'Assign values
MyArray(0) = ...field("Value1")
MyArray(1) = ...field("Value2")
MyArray(0) = ...field("Value3")

now I want to return all values.... What is the class structure for this...

\\\
Public Function Foo() As String()
Dim astr(9) As String
astr(0) = ...
...
Return astr
End Function
///
 
Back
Top