PDA

View Full Version : Mixed language callback functions between VB.net and Lahey WIN32 Fortran 95


bobbobbins
06-24-2004, 10:59 PM
Hi,
I have successfully managed to call my fortran dlls from vb.net however I can not find an example of callback. I want to call a fortran dll and then call a vb .net function from the fortran dll. I used to do this with Digital Fortran and it involved passing the address of the vb.net procedure to the fortran dll.

I would appreciate it if anyone could tell me how to do this with Lahey Fortran 95 (win32).

Thanks

tzeis
06-25-2004, 05:20 PM
Are you sure that you used to use VB.Net, and not VB6? As far as I know the only way to call in to a managaed code from unmanaged code is through COM.

bobbobbins
06-25-2004, 08:24 PM
I have sorted it out now. I had a problem with the delgate been byref and not byval. I have the ability to go back and forward into the fortran dll which can call back a vb.net procedure. COOL!!!!!