473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hooking into another process?

Hi

I want to make an application (in C#) that can catch text written to a
Richedit control in another application. Using Spy++ I can see that the
message I want to intercept is called EM_REPLACESEL. I have been googling
and I am pretty sure that the way forward is using SetWindowsHookEx, but the
hook I should use, I am not so sure about. WM_GETTEXT seems the only real
option. Another problem is that SetWindowsHookEx used from .Net will only
work on the same process, is this correct? Could I instead use a GetDlgItem,
but will this work on a window in another process?

As You properly can see, I am more than a little confused about the subject
atm. Could anyone please give me some directions (I have read the articles
from CuttingEdge, but it only seem to confirm that SetWindowsHookEx will
work within the same process)? Is there perhaps a free C dll which will
install a hook into the other process?

Thanks

Seth Gecko
Jul 21 '05 #1
3 1667
Dan
Is the other app (the one with the Richedit) in .net and under your
control?

-Dan

Jul 21 '05 #2
Nope, to both.

"Dan" <da*************@yahoo.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
Is the other app (the one with the Richedit) in .net and under your
control?

-Dan

Jul 21 '05 #3
The problem you will face is your code will be executing in the wrong
process space.

I suggest getting Advanced Windows Programming 5th edition (or later?) buy
richter, it has several chapters dedicated toprocess hooking, including
global hooks and a complete discussion of dll injection techniques.

You will need this knowledge.

- SEWilson

"Seth Gecko" <se*****@NOSPAMhotmail.com> wrote in message
news:O6*************@TK2MSFTNGP15.phx.gbl...
Nope, to both.

"Dan" <da*************@yahoo.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
Is the other app (the one with the Richedit) in .net and under your
control?

-Dan


Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthew Kelly | last post by:
I have pulled together a VB.net project that hooks the keyboard (Ref. Paul Kimmel's hooking program) and allow the user to send "mouse right clicks" via the SendInpuut function (mouse emulation...
79
by: pinkfloydhomer | last post by:
I want to scan a file byte for byte for occurences of the the four byte pattern 0x00000100. I've tried with this: # start import sys numChars = 0 startCode = 0 count = 0
1
by: TMP | last post by:
Below is the code snippet that I'm having problems with, the hook seems to work (hookResult returns a value other than zero) but then explorer crashes.Also I'm aware of the fact that instead of...
3
by: Seth Gecko | last post by:
Hi I want to make an application (in C#) that can catch text written to a Richedit control in another application. Using Spy++ I can see that the message I want to intercept is called...
0
by: webstuff | last post by:
Hi, I have a C# .NET application with lots of strings added through the visual designer (thus stored in the form's .resx file) specifying the application's company name and product name . ...
2
by: Dave A | last post by:
I am stuggling with databinding a drop down list, hooking into the SelectedIndexChanged and attempting to avoid using the viewstate. The drop down list is quite large so I would prefer to avoid...
5
by: Ryan Ginstrom | last post by:
Apropos recent threads about GUI editors, coming from a Win32/WTL C++ background, I actually like the idea of being able to (easily) create GUIs programmatically. But I still see a lot of the...
12
by: pigeonrandle | last post by:
Hi, Is it possible to hook another application's WM_MOVE messages using c#? There seems to be some argument as to what messages you can hook and whether you can listen in on other app's messages...
8
by: pigeonrandle | last post by:
Hi, Has anyone had any experience with hooking messages in other application windows (like SPY++). I want to listen for WM_MOVE messages, but can only seem to find examples of Keyboard and Mouse...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.