ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acess predefined buffer

I have a dll function that defines a buffer and a second dll function that writes to the buffer. However the buffer is not directly wired into the second function; the function "gets to know" the buffer by a structure handle that goes through each and every functions in this dll. I need to save the data in the buffer after the second dll write to it and I haven't found a way to do so. I have tried to create a local variable of the buffer and extract data out of the local variable. When I check the obtained data, no data has been written to the locate variable. it seems that when I create the local variable labview made a second copy of the buffer and no data has been written to the second copy. If I am to be correct, the question is how to access the real buffer that contains the real data, So far I have not got a clue how to do that.


kevin
Can a computer learn how to program?
0 Kudos
Message 1 of 2
(2,586 Views)


@kevinhy wrote:
I have a dll function that defines a buffer and a second dll function that writes to the buffer. However the buffer is not directly wired into the second function; the function "gets to know" the buffer by a structure handle that goes through each and every functions in this dll. I need to save the data in the buffer after the second dll write to it and I haven't found a way to do so. I have tried to create a local variable of the buffer and extract data out of the local variable. When I check the obtained data, no data has been written to the locate variable. it seems that when I create the local variable labview made a second copy of the buffer and no data has been written to the second copy. If I am to be correct, the question is how to access the real buffer that contains the real data, So far I have not got a clue how to do that.


kevin




LabVIEW can't easily access external memory. While there might be some way to do it, if I knew the exact details for the DLL, it would be going to be extremely complicated and difficult to explain. The most simple way is to actually add a function to the DLL which gets the "handle" as parameter and as second parameter a byte array in which that function copies the data you are interested in from that handle.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(2,575 Views)