Jump to content
Tuts 4 You

How to drag links from browser to app?


LCF-AT

Recommended Posts

Posted

Hi,

just wanna send some feedback about that problem.So now I did set the SendInput functions into a own thread and till now its working so far without to get the problem again.

                           invoke CreateThread,0,0,offset SendInputData,NULL,NULL,NULL
                           .if eax != FALSE
                               mov esi, eax
                               invoke WaitForSingleObject,esi,INFINITE
                               .if     eax == WAIT_FAILED
                                       invoke CloseHandle,esi
                               .elseif eax == WAIT_OBJECT_0 ; OK
                                       invoke CloseHandle,esi
                               .endif
                           .endif



SendInputData proc Data:DWORD

    invoke RtlZeroMemory,addr INP,sizeof INP
    mov INP.INPUT._type,INPUT_MOUSE
    mov INP.INPUT.mi.dwFlags, MOUSEEVENTF_LEFTDOWN
    invoke SendInput,1,addr INP,sizeof INP
    
    mov INP.INPUT._type,INPUT_MOUSE
    mov INP.INPUT.mi.dwFlags, MOUSEEVENTF_LEFTUP
    invoke SendInput,1,addr INP,sizeof INP

	Ret
SendInputData endp

Not sure why it seems to work now with this method.Otherwise I just hope that it keeps working.Before I also tried to use the mouse_event function (not in thread yet) but this also just failed = hangs inside without to come back anymore = I have to restart the system.

greetz

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
×
×
  • Create New...