MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Net/Link: Problem with DLL (1)

  • To: mathgroup at
  • Subject: [mg48855] Net/Link: Problem with DLL (1)
  • From: "psa" <psa at>
  • Date: Sat, 19 Jun 2004 04:31:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

My C type DLL (written in Compaq Visual Fortran)  returns a length 2 double
array, and I cannot get all two of the results.
I am confused as to when and how to supply an object in .Net/Link. I tried:

 In[] =
le","Double","Double","out Double[]"}];

With what I believe is the required and it fails.

In[] =  res=MakeNETObject[{0.0,0.0}]
In[] = TestDLL2 [1,2,3,4,res]
 NET::netexcptn: A .NET exception occurred: System.NullReferenceException:
Object reference not set to an instance of an
obj.espace.DLLWrapper8.testDLL2(Double , Double , Double , Double ,
Double[]& ).

Ditto, if it is it is passed res={0.0,0.0}.

By pretending it is just a scalar for output array I get the first element
only (not surprisingly?)
In =
le","Double","Double","out Double"}];
In[] = TestDLL2 [1,2,3,4,res]
In[] = res

If I am NOT doing something wrong, Is there a Windows API that returns an
array so I can see it working?


Peter Aptaker

  • Prev by Date: Re: General question on handling very large datasets in Mathematica
  • Next by Date: Re: Integration error in 5.0?
  • Previous by thread: AW: Simplifying a large matrix into an equation using M
  • Next by thread: Re: Net/Link: Problem with DLL (1)