Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

A VB.NET DLL calling by Fortran

Hi there,

and here is my second question today.

I like to call a VB.NET by Fortran. But I don't know how. I don't understand how t call a object-oriented language by Fortran.

 

Thanks

 

Olaf

0 Kudos
10 Replies
Highlighted
Black Belt
1 View

There are two examples of

There are two examples of doing this in the Parallel Studio XE for Windows Sample Bundle: MixedLanguage\VB-Calls-Fortran is the simplest.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Hi Steve,

Hi Steve,

thank you very much, but I like to call a VB.NET DLL FROM Fortran, so I look for Fortran-Calls-VB.NET.

Can you help again?

Olaf

0 Kudos
Highlighted
Black Belt
1 View

It would have to be a native

It would have to be a native mode DLL, in which case you would call it just the same as any other DLL. You would have to make sure you have the naming and calling conventions right (STDCALL on IA-32), and a lot of VB argument types won't map to Fortran in that direction.

What exactly are you trying to do here? Show the declaration of a VB routine you want to call.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Hi Steve,

Hi Steve, I have a VB,DLL from another application. In the handbook from that is written a call from a another VB.NET. Here is an extract : Public net1 As New NNToolNetLib.NNToolNet

With net1 .... a = .NNLoadF(DscFile) .... For i = 1 To .InputCount
.NetInput(i) = CStr(i * 10.1) Next a = .NetEvalF ... For i = 1 To .OutputCount a = 1 To .NetOutput(i) --- Next .... But I need to do that in Fortran or if necessary in C++ Regards Olaf
0 Kudos
Highlighted
Black Belt
1 View

You have not shown what the

You have not shown what the interface to the procedure is.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Hi Steve,

Hi Steve,

thank you for your answer.

That interface is all I have.

I couldt write an interface routine between the vb.net dll and fortran, I would say in VB.NET. But I don't know how.

regards

Olaf

0 Kudos
Highlighted
Black Belt
1 View

That's not an interface. The

That's not an interface. The declaration of the routine is somewhere else. My guess, though, is that the routine is VB.NET specific and doesn't support calls from other languages. You can try calling into a VB routine you write that then calls this other routine.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Here is the attachment

Here is the attachment

0 Kudos
Highlighted
Beginner
1 View

Hi Stefe,

Hi Steve,

I found in the environment of the commercial VB.NET-DLL a directory, wich is called "LibFIles"

I give you the files attached. Is someone of this what we need?

Olaf

0 Kudos
Highlighted
Black Belt
1 View

I have no clue what to do

I have no clue what to do with the contents of that ZIP. I don't see anything I recognize as a source file.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos