I try to pass a 1D array of ShortInt to an external DLL. I found many solutions for C DLLs (using the Call Library Function Node) but this doesn' work for my COM / ActiveX DLL. The external function expects a simple integer value as reference pointer to an array. The array is created in LV and will not be resized by the external function.
Any ideas how I can get the address of my array, send this pointer to the DLL and get my array filled with data that way? I tried typecasts (array => int) but they don't work that way.
The problem is not accessing the COM-DLL. This works fine. The DLL I have handles a datafile, I can access different integer and string-fields with the COM DLL, the only thing that doesn't work is getting data from the file into an array. The DLL-Method expects an pointer that points to an already initialised array.
The Call Library Function Node automatically passes the address of a connected array as a pointer, how can I do that with a COM-DLL?
***
Here's the documentation of the function I want to use:
virtual long CMCSAStream::GetRawDataOfChannel(short *pData,long lIndex) [virtual]
Get raw data of a single channel.
Parameters: pData pointer to data array of shorts (size must be determined before calling GetData. iIndex: index to channel (starts with zero!)
Returns: number of Data values read from the file, 0 if data is not a raw data stream