Im work on an application where currently everything is done in Visual Basic. We are now placing all the calculations in a Fortran Dll. In Visual Basic we update a progress bar at certain points to indicate how much of the calculation is done.
Im just wondering what is the best way to do this from Fortran. I know that you can use a 'Callback' from Fortran but I have heard this can cause problems and use alot of memory.
What about if I sent a flag variable (say an integer) to the Dll routine Im calling and then increase the value at different stages. Then in Visual Basic using a timer check the value of this variable once every second or half second.
Would this cause a problem when both VB and CVF are accessing the same variable (memory space) at the same time ?