Jump to content

Can you abort a dll ?


Recommended Posts

I have an application where I have to call a third party dll to do some calculations. Sometimes these calculation can take a long time and I would like to be able to provide the user with a stop button so they can abort the calculation. So far I haven't been able to figure out how I can abort the dll before it is finished. I thought I might be able to use the taskkill command (this is on a windows XP machine). I can use the taskkill command to shut down any exe that is running but either it doesn't work for stopping a dll or maybe I don't have the syntax right. I also tried using the VI server to abort the vi that calls the dll but that didn't work either. Any ideas on how I can abort the dll?

Link to comment

I have an application where I have to call a third party dll to do some calculations. Sometimes these calculation can take a long time and I would like to be able to provide the user with a stop button so they can abort the calculation. So far I haven't been able to figure out how I can abort the dll before it is finished. I thought I might be able to use the taskkill command (this is on a windows XP machine). I can use the taskkill command to shut down any exe that is running but either it doesn't work for stopping a dll or maybe I don't have the syntax right. I also tried using the VI server to abort the vi that calls the dll but that didn't work either. Any ideas on how I can abort the dll?

I don't think you can abort the DLL easily, since it's running inside your own app. Killing it would be literally suicidal. You could try to break up the calculations, so that you call the DLL more often (this is easier if you could modify the DLL code). You could write another LabVIEW app to run the DLL, and use TCP or network queues to communicate between the apps. That would make the DLL app killable, but it's a lot of work considering that your stated purpose is a slight improvement of the user experience.

Link to comment
  • 2 weeks later...

I have an application where I have to call a third party dll to do some calculations. Sometimes these calculation can take a long time and I would like to be able to provide the user with a stop button so they can abort the calculation.

The options I can think of require you to be able to modify the DLL.

1. The DLL could pop-up a progress window with a cancel button.

2. The data is sent to the DLL to calculate and the function call returns immediately. The DLL processes the data in the background and performs a callback when the calculation is finished. Another function call could be used to abort the calculation.

Tim

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.