autoitxp Posted May 26, 2011 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
trancexx Posted May 26, 2011 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
smartee Posted May 26, 2011 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
autoitxp Posted May 26, 2011 Author Posted May 26, 2011 That function is for advanced users.now this is very rude Thanks you very muchsmartee
autoitxp Posted May 28, 2011 Author Posted May 28, 2011 how to call this function ? function myfiles: Boolean;
smartee Posted May 28, 2011 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
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