UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Mouse Hook, Access 2016    
 
   
azizrasul
post Nov 4 2019, 05:43 AM
Post#1



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


The title of the thread should be MouseHook. I couldn't figure out how to change the title after posting it.

I have the following code copied from the internet (© Wayne Phillips / iTech Masters 2009)

CODE
Public Function NewMouseHook(ByRef Form As Access.Form) As Object

    Dim NativeCode As String
    Dim Kernel32Handle As Long
    Dim GetProcAddressPtr As Long
    Dim MouseHookAddr As Long
    Dim MouseHookLoader As Object
    Dim LoaderVTable As IDispatchVTable
            
    NativeCode = _
            "XYQPSWQ[T_S\\[S\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX- %uUPXX-%ueeT[PXX-E%%ePXX-uu0E-uu0EPXX-eeE%PXX-%e%uPXX-eeE PXX-%eE PXXX@@fX<0tF4+&4+2'&,V/PCp@-''2V/5+1''3V/ys 1S CCCuRfI>_ltcDPC@KCQcBnIAGBqcDPO@GBE@KCqc@YMQHUqp@dQ^AAAAGBUBISExD]MQQ=OYHAQ@\EAA@eiQDeiQHMIqFeiQLMIqHeiQPMIqHeiQTMIqHeiQXucOAAAAMcY^AAAAIsEHDEQCAeE@AeEC?GGCPCXM@BeqDAAoAAEA@KMC@azC@IAaBB@Ax[AABAiqXAqa<QCC@UFLwREHTIAA@AA\jmIPdqpaxBA\\mITdQqcRmiEMKX^AAAAf\MAIAQcP  TKKp>RPQM@JMH@azA@IAaBRCAHAAA@qjE@AA>JAAAxnAA@qCB@AADMAAAtuAA@QTB@AAlNAAAhAAA@UtclNIpt^]P<[VPXKpcEp>bPpQcU ?bM ? ypCAuPqM@n_LKWDBCkoAtTPajbaA@AQ\MmYRxBY_tAQ\DMBqkbp>uPp>u@p>upq>u pcU ??rpscM ??QPucevdqPAAePWtclNIppbG<AAAAhB L@AQWIWE>sA]cE ?bU ?bM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[@QFA @qT@EGAy@aZ@UGA @AU@aGAi@AZ@qGAi@A]@MFA @qJ@ACAi@AT@UGAc@A[@ACAM@QY@MFAt@QX@IFAs@AI@IBApAAM@aBA@AAA@]UXttuZdTFZe TYnPGZeDEAOpUPsIBAOpUPATF\sIBAC<vPePVRapGZoLGAULTPRLbM@MUYlpwTixGXo\FUr<vYA@qUePvTixGXo\FRoxwXA@aTiHF\uDGZFHVXe@AA0"
            
    ' Allocate the executable memory for the object
        MouseHookAddr = VirtualAlloc(0, Len(NativeCode), MEM_RESERVE_AND_COMMIT, PAGE_EXECUTE_RW)

    If MouseHookAddr <> 0 Then
    
        ' Copy the x86 native code into the allocated memory
            Call CopyMemoryAnsi(MouseHookAddr, NativeCode, Len(NativeCode))
              
        ' Force the memory address into an Object variable (also triggers the shell code)
            LoaderVTable.QueryInterface = MouseHookAddr
            Call CastToObject(MouseHookLoader, VarPtr(VarPtr(LoaderVTable)), SIZEOF_PTR32)
            If Not TypeOf MouseHookLoader Is VBA.Collection Then
                Set NewMouseHook = (MouseHookLoader)
                Set MouseHookLoader = Nothing
            End If
            
        ' Initialize our COM object
            Kernel32Handle = GetModuleHandleA("kernel32")
            GetProcAddressPtr = GetProcAddress(Kernel32Handle, "GetProcAddress")
            Call NewMouseHook.Init(Kernel32Handle, GetProcAddressPtr, Form.hWnd)
            
        ' Disable the scroll wheel by default.
            NewMouseHook.Scroll = False
        
    Else
    
        Err.Raise ERR_OUT_OF_MEMORY
    
    End If
    
End Function

When I compile the code, I get type mismatch on line

CODE
Call CastToObject(MouseHookLoader, VarPtr(VarPtr(LoaderVTable)), SIZEOF_PTR32)

regarding VarPtr.
This post has been edited by azizrasul: Nov 4 2019, 05:48 AM

--------------------
Aziz
Go to the top of the page
 
azizrasul
post Nov 4 2019, 06:09 AM
Post#2



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Solved the problem by adding

CODE
Private Declare PtrSafe Function VarPtr Lib "vbrun100.Dll" (Var As Any) As Long

However when the code reaches the line

CODE
Call CopyMemoryAnsi(MouseHookAddr, NativeCode, Len(NativeCode))

the Access db quits?

I do have the following additional code in the same module

CODE
Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" (ByVal Address As Long, ByVal Size As Long, ByVal AllocationType As Long, ByVal Protect As Long) As Long
Private Declare PtrSafe Function GetModuleHandleA Lib "kernel32" (ByVal ProcName As String) As Long
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" (ByVal Module As Long, ByVal ProcName As String) As Long
Private Declare PtrSafe Sub CopyMemoryAnsi Lib "kernel32" Alias "RtlMoveMemory" (ByVal Dest As Long, ByVal Source As String, ByVal Size As Long)
Private Declare PtrSafe Sub CastToObject Lib "kernel32" Alias "RtlMoveMemory" (ByRef Dest As Object, ByRef Source As Long, ByVal Size As Long)
Private Declare PtrSafe Function VarPtr Lib "vbrun100.Dll" (Var As Any) As Long

Private Const SIZEOF_PTR32              As Long = &H4
Private Const PAGE_EXECUTE_RW           As Long = &H40
Private Const MEM_RESERVE_AND_COMMIT    As Long = &H3000
Private Const ERR_OUT_OF_MEMORY         As Long = &H7

Private Type IDispatchVTable
    QueryInterface As Long
    AddRef As Long
    Release As Long
    GetTypeInfoCount As Long
    GetTypeInfo As Long
    GetIDsOfNames As Long
    Invoke As Long
End Type

This post has been edited by azizrasul: Nov 4 2019, 06:11 AM

--------------------
Aziz
Go to the top of the page
 
jleach
post Nov 4 2019, 06:22 AM
Post#3


UtterAccess Administrator
Posts: 10,269
Joined: 7-December 09
From: St. Augustine, FL


(edited title)

--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 
daolix
post Nov 4 2019, 09:05 AM
Post#4



Posts: 13
Joined: 29-September 16



QUOTE
When I compile the code, I get type mismatch on line

CODE
Call CastToObject(MouseHookLoader, VarPtr(VarPtr(LoaderVTable)), SIZEOF_PTR32)

regarding VarPtr.


QUOTE
Solved the problem by adding


CODE
Private Declare PtrSafe Function VarPtr Lib "vbrun100.Dll" (Var As Any) As Long


However when the code reaches the line


CODE
Call CopyMemoryAnsi(MouseHookAddr, NativeCode, Len(NativeCode))


the Access db quits?


I'm guessing you're using Access 2016 64 bit. The code you are showing is for 32bit only, although PtrSafe is used here. You have to adjust the Api functions accordingly. But I don't know if it runs under 64bit because I don't know if the native code runs under 64bit.


Go to the top of the page
 
azizrasul
post Nov 4 2019, 09:07 AM
Post#5



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


"I'm guessing you're using Access 2016 64 bit."
You guessed right.

--------------------
Aziz
Go to the top of the page
 
isladogs
post Nov 4 2019, 09:21 AM
Post#6


UtterAccess VIP
Posts: 1,879
Joined: 4-June 18
From: Somerset, UK


I assume you are trying to disable the mouse wheel scroll.
Stephen Lebans has code that is much simpler for this purpose.
See MouseWheelOnOff

If you need help converting it to 64-bit, let me know as I did that many years ago

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
azizrasul
post Nov 4 2019, 09:26 AM
Post#7



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


I am also using Stephen Lebans code, but the databse keeps closing down.

CODE
Private Sub Form_Load()
'
' Turn the MouseWheel Off
'
Dim blRet As Boolean
blRet = MouseWheelOFF
'
End Sub

CODE
Public Function MouseWheelOFF(Optional NoSubFormScroll As Boolean = False, Optional GlobalHook As Boolean = False) As Boolean
Dim s As String
Dim blRet As Boolean
Dim AccessThreadID As Long

On Error Resume Next
' Our error string
s = "Sorry...cannot find the MouseHook.dll file" & vbCrLf
s = s & "Please copy the MouseHook.dll file to your Windows System folder or into the same folder as this Access MDB."

' OK Try to load the DLL assuming it is in the Window System folder
hLib = LoadLibrary("MouseHook.dll")
If hLib = 0 Then
    ' See if the DLL is in the same folder as this MDB
    ' CurrentDB works with both A97 and A2K or higher
    hLib = LoadLibrary(CurrentDBDir() & "MouseHook.dll")
    If hLib = 0 Then
        MsgBox s, vbOKOnly, "MISSING MOUSEHOOK.dll FILE"
        MouseWheelOFF = False
        Exit Function
    End If
End If

' Get the ID for this thread
AccessThreadID = GetCurrentThreadId()
' Call our MouseHook function in the MouseHook dll.
' Please not the Optional GlobalHook BOOLEAN parameter
' Several developers asked for the MouseHook to be able to work with
' multiple instances of Access. In order to accomodate this request I
' have modified the function to allow the caller to
' specify a thread specific(this current instance of Access only) or
' a global(all applications) MouseWheel Hook.
' Only use the GlobalHook if you will be running multiple instances of Access!
MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, AccessThreadID, NoSubFormScroll, GlobalHook)

End Function

--------------------
Aziz
Go to the top of the page
 
isladogs
post Nov 4 2019, 09:49 AM
Post#8


UtterAccess VIP
Posts: 1,879
Joined: 4-June 18
From: Somerset, UK


Actually I've just checked my old app that uses this.
It seems mousehook.dll only runs in 32-bit as I had disabled the code when in 64-bit
Sorry to raise your hopes!

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
azizrasul
post Nov 4 2019, 09:57 AM
Post#9



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Actually that's good news as I can simply switch it off and not worry about it. Thanks.

--------------------
Aziz
Go to the top of the page
 
isladogs
post Nov 4 2019, 10:07 AM
Post#10


UtterAccess VIP
Posts: 1,879
Joined: 4-June 18
From: Somerset, UK


LOL. Do check carefully in case it was just my programming at fault all those years ago!

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
azizrasul
post Nov 4 2019, 10:15 AM
Post#11



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


You never know. I normally wait for someone to SCREEEEEAM then I worry about it. HeHe.

--------------------
Aziz
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    6th December 2019 - 05:13 AM