Jump to content

Snieres

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes Remy, it is. I have updated the question on stack. What you have is correct, but how do i go about viewing the data stored in the doublearray? It is more of a carry on question. I can not figure out how to get to the dimsizes and the elt through the DoubleArray. I have broken this question down to a basic 2d array.
  2. @David Heffernan That was a typo, it is PDoubleArray. Original Post has been edited.
  3. I have a type LabView created DLL that creates the following structure: typedef struct { int32_t dimSizes[2]; double elt[1]; } DoubleArrayBase; typedef DoubleArrayBase **DoubleArray; void __stdcall SimpleDoubleArray(int32_t Channels, int32_t Points, DoubleArray *DoubleArray); In Delphi have defined the structure as follows: type PDoubleArray = ^DoubleArray; DoubleArray = ^PDoubleArrayBase; PDoubleArrayBase = ^DoubleArrayBase; DoubleArrayBase = packed record dimSizes: array[0..1] of Int32; elt: array[0..0] of Double; end; var procedure SimpleDoubleArray(Channels, Points : Int32; TestDoubleArray: PDoubleArray);stdcall; external DLLDirectory; and call the function : procedure TForm8.btn1Click(Sender: TObject); var TestDoubleArray : DoubleArray; begin SimpleDoubleArray(5,5,@Testdoublearray); end; My question is that when i assign the DoubleArray as the output of a function, how do i read the information that is stored in the TestDoubleArray? In other words, how do i access the DoubleArrayBase record values of dimSizes and elt from the TestDoubleArray variable that i passed to the function? I am basically translating what is done in this post: https://lavag.org/topic/20486-lv-dll-creates-mysterious-doublearray-class/ to a Delphi equivalent.
×