What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Development relogger

mordor

Member
Joined
Apr 18, 2010
Messages
53
Reaction score
3
I start development relogger and understand that I need same options to operate with another programs :). As I understood we have same options to do this: Win32, COM and another. HB using BlackMagic API. What is most simple to understand and use method? Can you consult same sites or book about this? Or share your experience with me?

Best regards and thanks for help!
 
Thanks for help. I already found solution: WinAPI, user32.dll and Spy++. If same one interesting about that, see example code below. Simple program on C# that change text in calculator.
Code:
  static class Program     {         
[DllImport("user32.dll", EntryPoint = "FindWindow")]         
private static extern IntPtr FindWindow(string _ClassName, string _WindowName);           
[DllImport("user32.dll", EntryPoint = "FindWindowEx")]         
private static extern IntPtr FindWindowEx(IntPtr hwndPrnt, IntPtr hwndChildAfter, string _ClassName, string _WindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto)]         
public static extern int SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);         
const int WM_LBUTTONDOWN = 513;         
const int WM_LBUTTONUP = 514;         
const int WM_RBUTTONDOWN = 516;         
const int WM_RBUTTONUP = 517;         
const int WM_SETTEXT = 0x000C;           
[DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)]         
private static extern IntPtr SendMessageText(IntPtr hWnd, int wMsg, int wParam, string lParam);           
[STAThread]         
static void Main()         
{             
Application.EnableVisualStyles();             
Application.SetCompatibleTextRenderingDefault(false);             
Application.Run();         
}                  
public static void FindEditWindows(string message)         
{             
IntPtr calcWindow = FindWindow("SciCalc", "Calculator");             
if (calcWindow == IntPtr.Zero)             
{                 
MessageBox.Show("Not found Calculator window");                 
return;             
}             
IntPtr editWindow = FindWindowEx(calcWindow, IntPtr.Zero, "Edit", null);             
if (editWindow == IntPtr.Zero)             
{                 
MessageBox.Show("Not found Edit");                 
return;             
}             
SendMessageText(editWindow, WM_SETTEXT, 0, message);         
}
 
Last edited:
nice stuff so far but i'd stick to blackmagic if i were you
it's easier to understand,got everything you'll need and can be used freely
 
Back
Top