Hi everyone. I would appreciate if someone could give me the pointers or answer to the following:
I created a dll called xstr.dll by using fortran. Now i use VB 6.0 where i try to call the xstr.dll, which works for VB(single), CVF(real*4)... integers and boolean values. However when i try to pass strings to the xstr.dll i get nowhere. Sometimes i get memory could not be read and sometimes nothing happens. Here is my fortran subroutine inside the xstr.dll:
!DEC$ATTRIBUTES DLLEXPORT,ALIAS: "_xstr@12":: Xstr
c write(*,*) (a(i),i=1,6)
a(1) = 'b'
a(2) = 'y'
a(3) = 'e'
a(4) = char(0)
xstr = a(4)
Now here is the VB code that i use to call this subroutine:
Public Declare Function xstr Lib "c:dllsxstr.dll" Alias "_xstr@12" (ByVal c As String) As String
If you know where i could get some extra info on this it would be appreciated. Any suggestions or ideas would be appreciated as well, thanks.