Jump to content

get mouse double click time issue


Recommended Posts

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 works

MsgBox(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
EndFunc
Also, here is the documentation on that function http://msdn.microsoft.com/en-us/library/ms646258(VS.85).aspx

Does 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...