I have been given he task to read all data from the existing dll’s in labVIEW and broadcast the data to the clients.
Currently, I am having trouble with one of the dll’s written in C. When passed a memory key name and key number, if no error was detected, my labVIEW program attaches to the shared memory where the data is located. When the labVIEW program (main loop) is terminated I release the memory location. I don’t have a problem when I put in the correct key name and number, however, sometimes when I enter an erroneous key (for testing purposes) labVIEW gives me an Application error and terminates my program. As I said, this does not happen every time. The dll function returns an error c
ode “2” if it cannot attach to the shared memory for the given key name and number. I know that this dll works in other programs ( C ) when called, and it does not give an application error when a non-existent key is passed to the dll. I have attached a few of errors from what I get from the labVIEW program when I enter the erroneous key.
To summarize, the dll (testmanLib.dll) returns an error when an erroneous (non-existent) key name and key number is passed and the calling program should not give an Application error under these circumstances.
I have stripped the labVIEW code which just has the attached to shared memory function dll . Of course whatever key you put in when you run this program will be erroneous and that is the issue I would like to address. LabVIEW should not give me an Application error or any other error as shown in the attached file.
I have attached the labVIEW program testOpenShm.vi and the testmanLib.dll for your review.
Is there a
function in labVIEW that clears the memory?
Please let me know if you need any more information.
Regards,
Nish
E-mail: Nishchey.chhabra@ps.ge.com
Phone: 864-254-4666