Sign in to follow this  
Followers 0
Alex

How to write DLL's for AutoIt

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



I suggest you read the documentation for the language/tools you are using and determine how to build a DLL that is not a debug build and is not dynamically linked to the C-Runtime library.

Share this post


Link to post
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
Sign in to follow this  
Followers 0