Jump to content

How to write DLL's for AutoIt


Alex
 Share

Recommended Posts

I've got a following problem.

I have to write a DLL, which will be launched by autoIt. I've trird to do it, but failed - it doesn't work.

It doesn't work namely with autoIt, becourse I've launched it succesfully by another program.

DLL is written in Fortran language and compiled in Compaq Visual Fortran.

May be, I have to use some specific compiling options?

Even simplest code doesn't work.

This is example of Fortran code, I've tried:

SUBROUTINE SUBA(X, Y)

!DEC$ ATTRIBUTES DLLEXPORT:: SUBA

implicit none

character*(4) x, y

X = "vtre"

Y = "lhju"

RETURN

END SUBROUTINE

And I've tried to launch such simple dll with following autoit script:

$file = "G:\write.dat"

DIM $a, $b

$result = DllCall ( @ScriptDir & "\dll_test.dll", "int", "SUBA" , "str", $a, "str", $b )

MsgBox ( 0, "report", @error & @CRLF & 'result= ' & $result[2] )

FileWriteLine ( $file, $result[1] )

Records in file, as well as in messagebox are spurious.

dll_test.dll

May be, somebody could advice something?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...