- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm using a BackgroungWorker component in VB.net, through this thread I'm calling a DLL file(created by FORTRAN) and passing arrays between the interface/main program and the DLL filewhich is working without any problem. But, the mean problem I have with controlling this thread , where if the engine/DLL has been stopped after the end of the calculation I expected the backgroundwroker only should be stop as aresult. But this not the case, as when the engine/DLL stops all the interface will be closed not the thread(BackGroundWorker) only. So My question how can I manage that the if the engine stops the thread only should be affected (stops) not all the interface.
any help will be do appreciated
Many thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you say 'stopped', do you mean a STOP command is executed? Never do that in a DLL.
I would expect that if the number-cruncher in the DLL completes execution normally, or if an error condition is detected, your number-crunching code should be organised and written to exit and return control to the calling program, returning a flag set to an appropriate value (0=normal termination, -1 error condition,+n program exception n etc.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
many thanks , I will do you recommendation and let you know if there is any problem.
many thanks for your help one more time
Ahmed

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page