COM server & VB6

COM server & VB6


I am using COM server *.dll's in my VB6 applications. The statistical routines that is being calculated in fortran takes a while and I have got a problem in that VB does not know when the COM Server has been finished.

1) Is it possible to let VB know when the COM server is finished?
2) " to let VB know how far the process in the COM server is? This would make it possible to give the user in VB a nice progress bar.

( I did find some code in the old normal DLL samples, which worked - but how do I make it work in COM server )

On the VB side
Declare Sub Stats Lib "c:workinstats.dll" (Ret As Long, ByVal cb3 As Long)

Private Sub cmdRun_Click()
Call Stats(test, AddressOf ghproc3)
end sub

Public Sub ghproc3(p1 As Long)
frmView.lblProgress.Caption = p1
End Sub

On the Fortran side -
subroutine CalcStats(cbproc3)


subroutine cbproc3(i1)
integer*4 i1

end interface

do index=1,nloop

call cbproc3(index)

!rest of code

Otherwise the COM server works very nice with VB and it is lightning fast. ( I grew up in the VB3 days )



1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.