Mixed Language Programming between Digital Fortran and Visual Basic
Jerry DeLisle
jvdelisle@verizon.net
Fri Jun 13 02:38:00 GMT 2008
NavyBoy wrote:
> I successfully created a dll in Digital Fortran which I can use from Visual
> Basic. This DLL processes binary data. While processing a file, I would like
> to add a progress bar in Visual Basic. The problem is that there is no
> communation (values of variables) between the DLL and VB while the
> processing is taking place. All variable communications take place after the
> processing is done. I want to use the position of the file as the metric for
> the progress bar. i.e. when the position is set at the beginning of the file
> represents 0%, and at the end of the file is 100%. The formula is simple:
> 100 * CurrentFilePos / FileSize. The problem is to communicate this result
> back to VB while the processing is taking place. Any ideas?
>
> Thanks,
>
> NavyBoy
Well, this mailing list has nothing to do with Digital Fortran. I suggest you
try your question at comp.lang.fortran.
Putting that aside, you need to modify your VB code to call the dll as a sub
process so that it runs in the background (of sorts) and your VB app retains
control. Then you could make calls to a function in the dll that returns the
status info. It has been several years since I did any VB programming, but I do
think it has that capability.
Also use google:
http://msdn.microsoft.com/en-us/library/aa719109.aspx
Jerry
Jerry
More information about the Fortran
mailing list