bmptti
03-05-2009, 06:01 PM
Hello,
I have a VB.NET application in which I call a Fortran .NET DLL. How do you retrieve Character array values from Fortran to VB?
Thanks,
Brad
Here is what I have:
In VB.NET:
Dim clsFortran as New FortranModule.FortranL.FortranClass
Call clsFortran.FortranSubroutine
msgbox FortranGlobalModule.FortranGlobalModule.VB_WNAME(0 )
In Fortran:
MODULE GlobalModule
use System
use System%Windows%Forms
TYPE (System%String), POINTER, DIMENSION (:) :: VB_WNAME
END MODULE GlobalModule
In fortran subroutine:
USE GlobalModule
ALLOCATE(VB_WNAME(3))
VB_WNAME(:)=>USTRING(WNAME(:)) ! Where WNAME is a CHARACTER variable.
When I try to build this DLL I get the following errors:
error FRT1386: Pointer object in pointer assignment statement must be a variable name or a structure component which has the POINTER attribute. (on VB_WNAME(:)=>USTRING(WNAME(:)))
error FRT2565: SOURCE= specify missing. (on the ALLOCATE statement)
What am I doing wrong?
I have a VB.NET application in which I call a Fortran .NET DLL. How do you retrieve Character array values from Fortran to VB?
Thanks,
Brad
Here is what I have:
In VB.NET:
Dim clsFortran as New FortranModule.FortranL.FortranClass
Call clsFortran.FortranSubroutine
msgbox FortranGlobalModule.FortranGlobalModule.VB_WNAME(0 )
In Fortran:
MODULE GlobalModule
use System
use System%Windows%Forms
TYPE (System%String), POINTER, DIMENSION (:) :: VB_WNAME
END MODULE GlobalModule
In fortran subroutine:
USE GlobalModule
ALLOCATE(VB_WNAME(3))
VB_WNAME(:)=>USTRING(WNAME(:)) ! Where WNAME is a CHARACTER variable.
When I try to build this DLL I get the following errors:
error FRT1386: Pointer object in pointer assignment statement must be a variable name or a structure component which has the POINTER attribute. (on VB_WNAME(:)=>USTRING(WNAME(:)))
error FRT2565: SOURCE= specify missing. (on the ALLOCATE statement)
What am I doing wrong?