Enforcer Posted January 30, 2012 Posted January 30, 2012 Hi everybody, got a little problem... Lets say i have Delphi library something like this: library KPOT; uses SysUtils, Dialogs, Classes; {$R *.res} function GO(hz: string): integer; begin ShowMessage('DLL CALLED !!!! YO-'+hz); Result := 2; end; exports GO; begin end. and got autoit3.au3 test script: $lol = DllCall("KPOT.dll", "int", "GO","str","TEEEEEEEST FINE !!!") But when I'm runing it - it returns Fatal Error - can't read memory at adress... What I'm doing wrong ? Please help. [RU] Zone
Enforcer Posted February 9, 2012 Author Posted February 9, 2012 any help ? still need to solve this problem... [RU] Zone
smartee Posted February 9, 2012 Posted February 9, 2012 hi Enforcer,The problem might be memory management using strings in Delphi, here is an article with details.The Solution?Long story short, use Pchar or the likes to handle strings, here is with example Delphi Dll code and the corresponding AutoIt.Hope this helps -smartee
funkey Posted February 9, 2012 Posted February 9, 2012 Hi enforcer: Please upload the test dll, so that I can test it. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
GHOSTSKIKDA Posted July 7, 2013 Posted July 7, 2013 library KPOT; uses SysUtils, Dialogs, Classes; // {$R *.res} ===== for delete function GO(hz: string): integer; begin ShowMessage('DLL CALLED !!!! YO-'+hz); Result := 2; end; exports GO; begin end. [center]I LOVE ALGERIA .... ;-)[/center]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now