capo Posted February 25, 2009 Posted February 25, 2009 (edited) I have a dll and a function is like: int function(char *st,ulong FR,tstruct *cstruct,int att,int size,char *text); how would i call this in autoit? i tried: Dim $cstruct $cstruct = DllStructCreate("char error[255];int flag") $a = function(1,2,3,4,5) msgbox(0,'',DllStructGetData($cstruct,"error",1)) Func function($p1,$p2,$p3,$p4,$p5) $dll = DllCall("DLL.dll","int","function","str",$p1,"ulong",$p2,"ptr",DllStructGetPtr($cstruct),"int",$p3,"int",$p4,"str",$p5) return $dll[0] EndFunc Is there anything wrong with that code? am i calling the dll correctly ? Edited February 25, 2009 by capo
BrettF Posted February 25, 2009 Posted February 25, 2009 Anychance of knowing what the dll is? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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