LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use several instances of a dll, each having its own memory

Hello,

 

is it possible to use the CallLibraryNode to load several instances of a dll but each of it should have its own memory space?

For CINs, there are functions like GetDSStorage and SetDSStorage which provide private memory for each instance of a CIN.

These functions doesn't seem to work in Dlls.

Is there something similar available for Dlls?

Thank you.

 

Christian

0 Kudos
Message 1 of 3
(2,756 Views)

ChristianEC wrote:

Hello,

 

is it possible to use the CallLibraryNode to load several instances of a dll but each of it should have its own memory space?

For CINs, there are functions like GetDSStorage and SetDSStorage which provide private memory for each instance of a CIN.

These functions doesn't seem to work in Dlls.

Is there something similar available for Dlls?

Thank you.

 

Christian


You need to have the DLL provide that functionalty explicitedly. Not by loading the DLL multiple times but by functionality that allocates a memory block to contain the local data of that instance and deallocate it afterwards. If you know C++ you basically would implement an object that is the instance of your operation/data.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(2,738 Views)

Ok, thank you, I will look into this.

 

Christian

0 Kudos
Message 3 of 3
(2,711 Views)