geofromalimos 0 Posted May 27, 2011 Good morning devs. This is my first time trying to deal with DLLs and I've found some threads on this subject.Here is the documentation for a dll function:GetApiVersion()Function PrototypeWORD GetApiVersion( LPWORD Version );Parameter DescriptionVersion Returns version of API.Return ValuesRESULT_SUCCESSFUL 0Successfully returned version.Functional DescriptionReturns the API versionI try with the below autoit code:Local $version $out = DllCall("core.dll","dword","GetApiVersion","dword",$version) consolewrite("Version of the API is : "& $out)I always get 0 as output but i can't get the Version! Any help is really appreciated. Share this post Link to post Share on other sites
monoscout999 10 Posted May 27, 2011 i cant found the documentation :S if you have the http link please post it Share this post Link to post Share on other sites
SmOke_N 211 Posted May 27, 2011 1. Not sure where you got "dword" for either of those. 2. DllCall returns an array. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Share this post Link to post Share on other sites
newsak2005 1 Posted June 8, 2011 (edited) MessageBox Result. Return Array[0],[1],[2],[3] and [4]. Quesion - Answer. Yes, No, Ok, Cancel and other. If use array 0 Return ID Button If use array 1 Return Hex code If use array 2 Return Text If use array 3 Return Title If use array 4 Return Flag $sTitle = 'MsgBox Result Sample' $sText = 'Do you wanted test click button?' $Msg_Yes = 'You clicked..Yes' $Msg_NO = 'You clicked..No' While 1 $btn = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", $sText, "str", $sTitle, "int", 36) ;36 is flag Select Case $btn[0] = 6 ;id button..yes MsgBox(64, "", $Msg_Yes) Case $btn[0] = 7 ;id button..no MsgBox(64, "", $Msg_No) ExitLoop EndSelect WEnd Edited June 8, 2011 by newsak2005 Share this post Link to post Share on other sites