From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clean up specific memory address

does anybody know if its possible to clean up a specific memory address using labview?

0 Kudos
Message 1 of 7
(2,237 Views)

What do you mean by "clean up" and why would you ever need to do this?

0 Kudos
Message 2 of 7
(2,234 Views)

i just want to erase a dll from the memory address where it was loaded, the dll is not running anymore but is still loaded in the memory address

0 Kudos
Message 3 of 7
(2,232 Views)

So a better question is "How do I unload a DLL?" which it appears you asked yesterday.  Did you run a search?  Your question has already been asked and answered multiple times.  In LabVIEW 8.2 and later, you can unload a DLL by wiring an empty path to the DLL call.  If you call multiple functions in the same DLL, you will need to pass each of them an empty path individually.

0 Kudos
Message 4 of 7
(2,228 Views)

that is not working, i didnt do the dll, im just using a code that calls that dll and that code was already created, so i dont know the parameters of the dll to use a call library function to unload it, thats why im searching for alternate solutions. 

0 Kudos
Message 5 of 7
(2,222 Views)

You're asking about it in a funny way.  There's no way you could determine the memory address at which the DLL is loaded, and even if you could, clearing that address would be more likely to crash your computer than unload the DLL.

 

Can you modify the VIs that call the DLL to accept the path to the DLL as an input?  That would be the best solution.  You could possibly create a separate executable that only handles calls to the DLL and allows access through VI Server; you could then exit that separate program any time you need to unload the DLL.  I did something similar once when I needed to access an external component that crashed regularly; by moving it to a separate program I was able to keep my main program running even when that component crashed.  It's not an ideal solution, though.  I suppose you could wrap the VIs that call the DLL into their own, LabVIEW-generated DLL, and call that DLL in your code instead, which would give you the ability to unload it with the empty path approach.

0 Kudos
Message 6 of 7
(2,220 Views)

that could be a solution, making the vi an executable, i'll try it

thanks for the help 

bro

0 Kudos
Message 7 of 7
(2,218 Views)