N
Neville Lang
Hi all,
Here is a problem I first struck a while back in the Compact Framework. I am
now using the full Framework (v2.0) and wanted to know whether there is
anyway around this issue without building separate shim code in another DLL.
Here is the layout of the external C DLL function:
int thisFunction( [in] double a, [in] int b, [out] double* c)
The double* c argument passes back an array of 6 doubles.
My VB code is like this:
<DllImport("External.DLL")> _
Public Shared Function thisFunction( ByVal a As Double, ByVal b As Integer,
ByRef c As Double() ) As Integer
End Function
...
...
...
Dim iRet As Integer
Dim a As Double
Dim b As Integer
Dim c(5) As Double
a = 36.12
b = 4
iRet = thisFunction( a, b, c )
....
....
At the moment, the call to this function is crashing. What is the best
solution for this type of problem on the full Framework?
Regards,
Neville Lang
Here is a problem I first struck a while back in the Compact Framework. I am
now using the full Framework (v2.0) and wanted to know whether there is
anyway around this issue without building separate shim code in another DLL.
Here is the layout of the external C DLL function:
int thisFunction( [in] double a, [in] int b, [out] double* c)
The double* c argument passes back an array of 6 doubles.
My VB code is like this:
<DllImport("External.DLL")> _
Public Shared Function thisFunction( ByVal a As Double, ByVal b As Integer,
ByRef c As Double() ) As Integer
End Function
...
...
...
Dim iRet As Integer
Dim a As Double
Dim b As Integer
Dim c(5) As Double
a = 36.12
b = 4
iRet = thisFunction( a, b, c )
....
....
At the moment, the call to this function is crashing. What is the best
solution for this type of problem on the full Framework?
Regards,
Neville Lang