Jump to content

DLL Question


jay
 Share

Recommended Posts

I'm not aware of any place that houses DLLs written specifically for AutoIt. Are you aware that AutoIt (or at least the beta) can in fact call functions of any DLL whether or not it was intended to be used with AutoIt?

Link to comment
Share on other sites

I'm not aware of any place that houses DLLs written specifically for AutoIt. Are you aware that AutoIt (or at least the beta) can in fact call functions of any DLL whether or not it was intended to be used with AutoIt?

I sort of understand that were can i read on how to access functions of a DLL

Thanks

Jay

Link to comment
Share on other sites

I'm not aware of any place that houses DLLs written specifically for AutoIt. Are you aware that AutoIt (or at least the beta) can in fact call functions of any DLL whether or not it was intended to be used with AutoIt?

I've got a following problem.

I have to write a DLL, which will be launched by autoIt. I've tried 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 compile 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"

$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.

Best regards. Alexey.

Link to comment
Share on other sites

were can i read on how to access functions of a DLL

Generally DLLs will include some form of documentation. MSDN has a wealth of information on calls that you can make to Windows' DLLs (if you know what you're doing). Lazycat offers some DLLs on his AutoIt script page.

There are tools around that will tell you what functions reside within a DLL (such as the free Dependency Walker) but that's not a great way of doing things because it won't tell you (at least DW doesn't) what sort of parameters the functions will expect.

I only know as much as I've said though because I'm still learning about this myself. Maybe this thread will get the attention of one of the developers.

Link to comment
Share on other sites

Generally DLLs will include some form of documentation. MSDN has a wealth of information on calls that you can make to Windows' DLLs (if you know what you're doing). Lazycat offers some DLLs on his AutoIt script page.

There are tools around that will tell you what functions reside within a DLL (such as the free Dependency Walker) but that's not a great way of doing things because it won't tell you (at least DW doesn't) what sort of parameters the functions will expect.

I only know as much as I've said though because I'm still learning about this myself. Maybe this thread will get the attention of one of the developers.

I wish someone would post a in-depth tutorial on this

Using some good real world examples..

Jay

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...