autoitxp 0 Posted May 26, 2011 (edited) how to call this function prams from dll created in delphi i have no idea how to use this function through auto-it procedure Myfile(FileName : Pchar); stdcall; DllCall("myfile.dll","long","Myfile","pchar","myfile.jpg")? Edited May 26, 2011 by autoitxp Share this post Link to post Share on other sites
trancexx 1,013 Posted May 26, 2011 (edited) You open the help file and start reading DllCall section. That function is for advanced users. Edited May 26, 2011 by trancexx ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
smartee 14 Posted May 26, 2011 hi autoitxp, Here's a quick example library HelloWorld; uses SysUtils, Classes, Dialogs; {$R *.res} Procedure EchoTest(MyMessage:Pchar); stdcall; begin ShowMessage(MyMessage) end; exports EchoTest; begin end.DllCall("HelloWorld.dll", "none", "EchoTest", "str", "Hello Delphi from AutoIt")Hope this helps, -smartee Share this post Link to post Share on other sites
autoitxp 0 Posted May 26, 2011 That function is for advanced users.now this is very rude Thanks you very muchsmartee Share this post Link to post Share on other sites
autoitxp 0 Posted May 28, 2011 how to call this function ? function myfiles: Boolean; Share this post Link to post Share on other sites
smartee 14 Posted May 28, 2011 hi again autoitxp ,Glad to help Here's another example, this time with both a parameter, and a return value library HelloWorld2; uses SysUtils, Classes; {$R *.res} function isOdd(testint: integer):boolean; stdcall; begin Result := ((testint mod 2)=1); end; exports isOdd; begin end.Do $iRandomInt = Random(1, 100, 1) $sAns = " is even." $aRet = DllCall("HelloWorld2.dll", "boolean", "isOdd", "int", $iRandomInt) If $aRet[0] Then $sAns = " is odd." Until (MsgBox(65, "Result", $iRandomInt & $sAns) <> 1)Hope this helps ,-smartee Share this post Link to post Share on other sites