- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created activeX dll (HGC_TestFortran.dll) with VB containing a method (SUM)that makes the sum of two values. The sum is returned.
Public Sub Sum(ByVal X As Long, ByVal Y As Long, ByRef lSum As Long)
lSum = X + Y
End Sub
I have used the "Fortran Module Wizard" to generate the interface between fortran and the activex dll. I have used "Type library containing COM interface information".
My fortran project looks as follow:
USE TestSumRet
implicit none
integer*4 object, nstatus, lsum
integer*4 status
CALL COMInitialize (status)
CALL COMCREATEOBJECT ("HGC_TestFortran.TestFortran", object, nstatus)
! 100 and 1224 are the input parameters of my
! method SUM
! lSum is the sum
call $$TestFortran_Sum(object, 100, 1224, lSum)
print *, lsum
end program SumTwoNumbers
This program looks fine and after running, 1324 is displayed.
However, when I put my dll (HGC_TestFortran.dll) in COM+, then the program doesn't work anymore. The result is now 0.
Do you now what the problem could be?
Attached you'll find the code created by the "Fortran Module Wizard"
Best regards,
Hilde
Public Sub Sum(ByVal X As Long, ByVal Y As Long, ByRef lSum As Long)
lSum = X + Y
End Sub
I have used the "Fortran Module Wizard" to generate the interface between fortran and the activex dll. I have used "Type library containing COM interface information".
My fortran project looks as follow:
USE TestSumRet
implicit none
integer*4 object, nstatus, lsum
integer*4 status
CALL COMInitialize (status)
CALL COMCREATEOBJECT ("HGC_TestFortran.TestFortran", object, nstatus)
! 100 and 1224 are the input parameters of my
! method SUM
! lSum is the sum
call $$TestFortran_Sum(object, 100, 1224, lSum)
print *, lsum
end program SumTwoNumbers
This program looks fine and after running, 1324 is displayed.
However, when I put my dll (HGC_TestFortran.dll) in COM+, then the program doesn't work anymore. The result is now 0.
Do you now what the problem could be?
Attached you'll find the code created by the "Fortran Module Wizard"
Best regards,
Hilde
Link Copied
0 Replies
![](/skins/images/DF2E495CEC88D713A66401CF495CD875/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page