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

IVF COM Wizard: calling Fortran from VB

d_s_pradeep
Beginner
351 Views

We are trying to port a COM server application from CVF to IVF using the new COM wizard, and are running into some problems.

The Fortran code is called from VB, andfails with the error "Wrong number of arguments or invalid property assignment", which is a VB runtime error. The problem appears to be with an interface method (get_status) which takes an intent(out) integer(4) argument.

Wizard-generated Fortran function looks like this:

! ITest_Instruct_get_Status
function ITest_Instruct_get_Status( ObjectData ,&
VALUE) result (hresult)
use Test_Instruct_Types
implicit none
type(Test_Instruct_InstanceData) ObjectData
!dec$ attributes reference :: ObjectData
INTEGER(4), intent(out) :: VALUE
integer(long) hresult
! DO NOT REMOVE THIS LINE
! TODO: Add implementation
hresult = S_OK
! DO NOT REMOVE THIS LINE
end function

Itseems thatthe code fails when VB tries to call this method. (The IDL type for argument VALUE has been defined as LONG.)An equivalent CVF-compiled COM servercalled from the same VBexe runs fine.

I'd appreciate any help on this issue. I have a minimal test project that I can pass along, if that would help.

Thanks, Pradeep.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
351 Views
Please submit your test project and problem description to Intel Premier Support.
0 Kudos
Reply