VB.NET - Pointers and send key commands to DX9 game

05/24/2013 19:00 ax5#1
Ant one that knows how to read pointers/memory from a online game ? like hp/mana/exp and get them in the program ?

Also any ideas to send key commands to an game that is coded with DX9 apis ?
05/24/2013 19:57 #SoNiice#2
Send Keys to a DirectX Game:

Code:
struct INPUT 
{ 
    public UInt32 type; 
    //KEYBDINPUT: 
    public ushort wVk; 
    public ushort wScan; 
    public UInt32 dwFlags; 
    public UInt32 time; 
    public UIntPtr dwExtraInfo; 
    //HARDWAREINPUT: 
    public UInt32 uMsg; 
    public ushort wParamL; 
    public ushort wParamH; 
} 
  
enum SendInputFlags 
{ 
    KEYEVENTF_EXTENDEDKEY = 0x0001, 
    KEYEVENTF_KEYUP = 0x0002, 
    KEYEVENTF_UNICODE = 0x0004, 
    KEYEVENTF_SCANCODE = 0x0008, 
} 
  
[DllImport("user32.dll")] 
static extern UInt32 SendInput(UInt32 nInputs, [MarshalAs(UnmanagedType.LPArray, SizeConst = 1)] INPUT[] pInputs, Int32 cbSize);
For using this:

Code:
INPUT[] InputData = new INPUT[1]; 
  
InputData[0].type = 1; //INPUT_KEYBOARD 
InputData[0].wScan = (ushort)hex_code; // http://tescosi.com/wiki/General:DirectX_KeyMap
InputData[0].dwFlags = (uint)SendInputFlags.KEYEVENTF_SCANCODE;
For your memory problem, there are more than enough tutorials at the www.
05/24/2013 22:27 dready#3
sending keys is most of the time, not worth it, if you realy need todo it, you can use what soonice posted or hook the appropriate function in directx, should be the better way normaly
05/26/2013 14:53 ax5#4
Quote:
Originally Posted by SoNiice View Post
Send Keys to a DirectX Game:

Code:
struct INPUT 
{ 
    public UInt32 type; 
    //KEYBDINPUT: 
    public ushort wVk; 
    public ushort wScan; 
    public UInt32 dwFlags; 
    public UInt32 time; 
    public UIntPtr dwExtraInfo; 
    //HARDWAREINPUT: 
    public UInt32 uMsg; 
    public ushort wParamL; 
    public ushort wParamH; 
} 
  
enum SendInputFlags 
{ 
    KEYEVENTF_EXTENDEDKEY = 0x0001, 
    KEYEVENTF_KEYUP = 0x0002, 
    KEYEVENTF_UNICODE = 0x0004, 
    KEYEVENTF_SCANCODE = 0x0008, 
} 
  
[DllImport("user32.dll")] 
static extern UInt32 SendInput(UInt32 nInputs, [MarshalAs(UnmanagedType.LPArray, SizeConst = 1)] INPUT[] pInputs, Int32 cbSize);
For using this:

Code:
INPUT[] InputData = new INPUT[1]; 
  
InputData[0].type = 1; //INPUT_KEYBOARD 
InputData[0].wScan = (ushort)hex_code; // http://tescosi.com/wiki/General:DirectX_KeyMap
InputData[0].dwFlags = (uint)SendInputFlags.KEYEVENTF_SCANCODE;
For your memory problem, there are more than enough tutorials at the www.
This is not vb.net code :P this is C
05/26/2013 15:05 tolio#5
[Only registered and activated users can see links. Click Here To Register...]