geofromalimos Posted May 27, 2011 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.
monoscout999 Posted May 27, 2011 Posted May 27, 2011 i cant found the documentation :S if you have the http link please post it
Moderators SmOke_N Posted May 27, 2011 Moderators 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.
newsak2005 Posted June 8, 2011 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
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