|
You last visited: Today at 09:56
Advertisement
VB.NET - Pointers and send key commands to DX9 game
Discussion on VB.NET - Pointers and send key commands to DX9 game within the .NET Languages forum part of the Coders Den category.
05/24/2013, 19:00
|
#1
|
elite*gold: 0
Join Date: May 2009
Posts: 1,050
Received Thanks: 472
|
VB.NET - Pointers and send key commands to DX9 game
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
|
#2
|
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
|
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
|
#3
|
elite*gold: 100
Join Date: Aug 2005
Posts: 595
Received Thanks: 208
|
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
|
#4
|
elite*gold: 0
Join Date: May 2009
Posts: 1,050
Received Thanks: 472
|
Quote:
Originally Posted by SoNiice
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
|
#5
|
elite*gold: 2932
Join Date: Oct 2009
Posts: 6,966
Received Thanks: 1,097
|
|
|
|
 |
Similar Threads
|
How to send keystrokes to a game
01/14/2012 - C/C++ - 13 Replies
Dear reader,
I am recently starting to learn C++.
I have the following problem:
I build this GUI program which should repeat my shouts
by a simple method.
Send a "space", then "up key", then "enter key" command.
Only this is, that it will not respons if the window is not focussed.
|
[HOWTO] Send commands to server on INT
06/19/2011 - Kal Online - 4 Replies
To send commands to the server you must:
1. Get your code into the kal process.
Use an injector, or use the recently popular dsound.dll > bot.dll technique (what would we technically call this???).
2. Find the send function address.
Plenty of public code for this around, but let's use this common source (if you originally wrote this code, claim it because I don't know).
DWORD Send_To_Server_Main_ = SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45...
|
how to ban/send to bot jail with gm commands
07/13/2010 - CO2 Private Server - 4 Replies
guys, i have a co pserver5165
can some one tell me how to ban or send to bot jail with gm commands?
|
Game Pointers
11/13/2009 - General Coding - 0 Replies
Bana Metin2de Pointer Bulmayı Gösterebilecek Biri Varsa Lütfen Yardım Etsin.
Wie hat sich Metin2 Zeiger? Würden Sie mir bitte helfen?
How has Metin2 pointer? Would you please help me?
Depuis combien de pointeur Metin2? Souhaitez-vous s'il vous plaît aidez-moi?
|
Can someone send me v5017 commands through msn messenger?
08/24/2009 - CO2 Private Server - 1 Replies
Send me commands. Add me [email protected]
|
All times are GMT +1. The time now is 09:58.
|
|