Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Callbacks to VB.net

rahzan
Novice
444 Views

I would like my f90 dll to be able to trigger callbacks (or event handler)passed to it by a caller in VB.net.

This normally would get donr in pure f90 using "External declaration"

for example:

VB.net calls F90 routine (and passes the name/address of another VB routine), which in turn calls back a utility routine in VB.net to complete its computation then returns to the original VB.net caller.

Would be ok even if the call-back/event handler'sname is fixed and cannot be passed.

I am still on CVF 6.6 until IF copmes up with its COM wizid, but I"m hoping the interfacing is not terribly compiler dependent.

Is there ANYWAY this can be done?

Thanks,

Tim

0 Kudos
1 Reply
Nick2
New Contributor I
444 Views
I think you're trying to do more mixing of unmanaged and managed code than was originally intended. Your best bet would be to have VB call your Fortran sub with some sort of a flag, where the flag indicates to VB whether or not to raise the event, and then the Fortran sub sets the flag. If need be, split the original Fortran sub into two.
0 Kudos
Reply