NerdFencer Posted January 31, 2009 Share Posted January 31, 2009 I am beginning to write a mouse UDF library, I am having an issue with the _MouseGetDoubleClickTime function, the DllCall Error code is 1 (unable to use the DLL file)Here is that function (with some debug code), a call to it, and another function that uses the same dll file that worksMsgBox(0,"Double Click Time",_MouseGetDoubleClickTime()) ; #FUNCTION# ==================================================================================================================== ; Name...........: _MouseButtonSwap ; Description ...: Sets the mouse buttons to either swapped or not ; Syntax.........: _MouseButtonSwap($fOn) ; Parameters ....: $fOn - True-Swapped False-Normal ; Return values .: Success - >0:Was reversed Before 0:Was not reversed before ; Failure - -1 ; Author ........: NerdFencer ; =============================================================================================================================== Func _MouseButtonSwap($fOn) If Not($fOn==True) And Not($fOn==False) Then Return SetError(1,0,-1) Return DllCall(@WindowsDir&"\system32\user32.dll","byte","SwapMouseButton","byte",$fOn) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _MouseGetDoubleClickTime ; Description ...: Gets the double click time ; Syntax.........: _MouseGetDoubleClickTime() ; Return values .: Success - the current double-click time in milliseconds ; Author ........: NerdFencer ; =============================================================================================================================== Func _MouseGetDoubleClickTime() $retval=DllCall(@WindowsDir&"\system32\user32.dll","uint","GetDoubleClickTime","none",False) MsgBox(0,@error,$retval) Return $retval EndFuncAlso, here is the documentation on that function http://msdn.microsoft.com/en-us/library/ms646258(VS.85).aspxDoes anybody know what I am doing wrong? _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
Authenticity Posted January 31, 2009 Share Posted January 31, 2009 lol It was so embarrassing to not find the problem. Anyway you shouldn't call this function with "none" and False at all: $retval = DllCall('user32.dll', 'uint', 'GetDoubleClickTime') ConsoleWrite(@error & ': ' & $retval[0] & @CRLF) Link to comment Share on other sites More sharing options...
NerdFencer Posted February 1, 2009 Author Share Posted February 1, 2009 Thanks, it works I figured that it was just something stupid like that, but I just wasn't seeing it... _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
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