• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 7 of 7
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      mrparo's Avatar
      Join Date
      Oct 2012
      Location
      Australia
      Posts
      10
      Thanks (-->)
      2
      Thanks (<--)
      0

      send key dinput8

      Silent VPN
      Im trying to send a mouse click to driect input

      SendInput & mouse_event
      just freezes the mouse and don't click the mouse
      so they dont work.

      PostMessage
      don't do anything

      I have hooked GetDeviceData
      as that function is called in the game.

      i can stop mouse clicks with it but am unable to send a mouse click
      this is how im trying to send mouse click
      Code:
      HRESULT WINAPI hkGetDeviceData(LPDIRECTINPUTDEVICE pInputDevice, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
      {
      	HRESULT Result = oGetDeviceData(pInputDevice, cbObjectData, rgdod, pdwInOut, dwFlags);
      
      	rgdod->dwOfs = DIMOFS_BUTTON0;
      	rgdod->dwData = 0x80;
      
          return Result; 
      }
      what am i doing wrong?
      Thanks

    2. #2
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      My Best guess
      Code:
      HRESULT WINAPI hkGetDeviceData(LPDIRECTINPUTDEVICE pInputDevice, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
      {
      
      DIDEVICEOBJECTDATA Buffer[50]; //50 is just a large random number, I dont feel like setting up a dynamic array for a simple example
      long TotalItems;
      TotalItems = *(long*)pdwInOut;
      
      for(int Item = 0; Item < TotalItems; Item++)
      {
      Buffer[Item] = *(DIDEVICEOBJECTDATA*)  (rgdod+(Item*cbObjectData));
      if(Buffer[Item].dwOfs ==DIMOFS_BUTTON0)
      {
      MessageBoxA(NULL,"Mouse Was Clicked", "The Mouse has been clicked", MB_OK);
      } 
      
      }
          return oGetDeviceData(pInputDevice, cbObjectData, rgdod, pdwInOut, dwFlags);
      }

      try that out, it should give you a messagebox when you click you mouse, ive never worked with that function and the code untested but I think its right.

    3. Thanks mrparo thanked for this post
    4. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      mrparo's Avatar
      Join Date
      Oct 2012
      Location
      Australia
      Posts
      10
      Thanks (-->)
      2
      Thanks (<--)
      0
      hey thanks for the reply.
      but the problem is i cant send a mouse click
      i know how to detect if i have clicked the mouse kinda like you posted there.
      i think it has something to do with the way its getting polled

    5. #4
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      I was actually asking if that DID work, because if it did - I know how you would write a mouse click into the array without losing any of the data.

    6. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      mrparo's Avatar
      Join Date
      Oct 2012
      Location
      Australia
      Posts
      10
      Thanks (-->)
      2
      Thanks (<--)
      0
      hey mate that dose work when i click the mouse.
      But the problem is that once i have clicked the mouse once the message box will keep coming up

    7. #6
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      "The high bit of the low byte is set if the button was pressed; it is clear if the button was released." wanna be any more useless MSDN -.- ... sooo.... Test this, if the number changes when the mouse is release.. makes it

      If(Buffer[Item].dwOfs ==DIMOFS_BUTTON0 && Buffer[Item].dwData == VALUE_WHEN_MOUSE_IS_DOWN)

      If this works, then Ill see about trying to get it to accept your mouse clicks. There is a chance though even if it does work - that this isnt the function the game uses to determine of you have clicked the mouse or not.


      Code:
      HRESULT WINAPI hkGetDeviceData(LPDIRECTINPUTDEVICE pInputDevice, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
      {
      
      DIDEVICEOBJECTDATA Buffer[50]; //50 is just a large random number, I dont feel like setting up a dynamic array for a simple example
      long TotalItems;
      TotalItems = *(long*)pdwInOut;
      
      for(int Item = 0; Item < TotalItems; Item++)
      {
      Buffer[Item] = *(DIDEVICEOBJECTDATA*)  (rgdod+(Item*cbObjectData));
      if(Buffer[Item].dwOfs ==DIMOFS_BUTTON0)
      {
      char TextBuffer[50];
      sprintF(&TextBuffer, "Does this Num change when you click the mouse?  %d",Buffer[Item].dwData);
      MessageBoxA(NULL,TextBuffer, "Debug Crap", MB_OK);
      } 
      
      }
          return oGetDeviceData(pInputDevice, cbObjectData, rgdod, pdwInOut, dwFlags);
      }

    8. Thanks mrparo thanked for this post
    9. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      mrparo's Avatar
      Join Date
      Oct 2012
      Location
      Australia
      Posts
      10
      Thanks (-->)
      2
      Thanks (<--)
      0
      Silent VPN
      number says 128 when i click.
      but the message box keeps coming up after i click

      edit:
      the message box will go away after i minimize the game (game is set windowed mode)
      then get back into it then click ok on message box.

      then when i click in game again with mouse the message box shows like it should with a mouse click

      number is when mouse clicked
      0 when mouse button released
      Last edited by mrparo; 11-06-2012 at 02:06 PM.

    Similar Game Hacker Threads

    1. Replies: 1
      Last Post: 04-18-2016, 09:49 PM
    2. Send or simulate Xinput button press/release to game
      By DiadeDood in forum Hacking Help
      Replies: 5
      Last Post: 11-28-2014, 11:00 AM
    3. C++ send doesnt update client
      By XNickX in forum C/C++
      Replies: 9
      Last Post: 05-18-2014, 02:17 PM
    4. please send me a link to download c
      By programmer in forum C/C++
      Replies: 5
      Last Post: 07-17-2012, 01:14 PM