Answered by:
forum for visual basic language?

Question
-
Hi!
where is the forum for the following question:
VB Fortran DLL
which category and forum?
I try to understand how to use a fortran function (which is in a dll) from VB.
Actually I want to use vb as interface.
I the VB 2008 express form I have 2 textbox and a button.
I enter a number in the top textbox and once the button is pushed, this number should be multiplied by 23 and should appear in the bottom textbox...
here is my VB code:
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim k, l As Integer
k = TextBox1.Text
l = somme(k)
TextBox2.Text = l
End Sub
End Class
Module global1
Declare Function somme Lib "C:\test\beware.dll" (ByVal r As Integer ) As Double
End Module
and my fotran code (I use CVF):
integer function somme(a)
but I have an error and I can't manage to fix it yet.
!DEC$ATTRIBUTES STDCALL :: somme
!DEC$ATTRIBUTES DLLEXPORT:: somme
!DEC$ATTRIBUTES REFERENCE:: a
!DEC$ATTRIBUTES ALIAS: 'somme'::somme
integer::a
integer i
i=a*23
somme=i
return
end
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Could you help me?
ThanksTuesday, July 14, 2009 6:13 PM
Answers
-
Hi There,
Thank you for your post! I would suggest posting your question in one of the following forums:
- Visual Basic 6 Newgroups
- Visual Basic 6.0 on MSDN Library
- MSDN Visual Basic 6.0 Resource Center
- VB City
- VB-Helper
- VB Forums
- CodeGuru
- Code Project
- Planet Source Code
- Visual Basic Interop and Upgrade (Update VB6 codes to .NET)
Have a great day !
Shrikant Maske Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Edited by Shrikant Maske Tuesday, July 14, 2009 6:40 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Tuesday, March 27, 2012 4:39 AM
Tuesday, July 14, 2009 6:38 PM -
Hi,
Thank you for your post! I would suggest posting your question in one of the Microsoft Developer Network > Forums Home > Microsoft Visual Studio 2010 Beta 1 Forums > Visual Basic Language located here: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/threads.
Have a great day!
Sudarshan shindode Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by sudarshans1 Tuesday, July 14, 2009 6:39 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Tuesday, March 27, 2012 4:39 AM
Tuesday, July 14, 2009 6:38 PM
All replies
-
Hi There,
Thank you for your post! I would suggest posting your question in one of the following forums:
- Visual Basic 6 Newgroups
- Visual Basic 6.0 on MSDN Library
- MSDN Visual Basic 6.0 Resource Center
- VB City
- VB-Helper
- VB Forums
- CodeGuru
- Code Project
- Planet Source Code
- Visual Basic Interop and Upgrade (Update VB6 codes to .NET)
Have a great day !
Shrikant Maske Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Edited by Shrikant Maske Tuesday, July 14, 2009 6:40 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Tuesday, March 27, 2012 4:39 AM
Tuesday, July 14, 2009 6:38 PM -
Hi,
Thank you for your post! I would suggest posting your question in one of the Microsoft Developer Network > Forums Home > Microsoft Visual Studio 2010 Beta 1 Forums > Visual Basic Language located here: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/threads.
Have a great day!
Sudarshan shindode Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by sudarshans1 Tuesday, July 14, 2009 6:39 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Tuesday, March 27, 2012 4:39 AM
Tuesday, July 14, 2009 6:38 PM