Controlling BackGround worker Component In VB.net, Through DLL file created by FORTRAN

Controlling BackGround worker Component In VB.net, Through DLL file created by FORTRAN

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

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.)

 Hi Anthony Richard

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today