• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

How to hook to another windows to determine new windows was created ?

Hi
I want to write a small app by C# with features:
- It will hook to Windows or specific Windows (like Internet Explorer)
- For Windows Hook (is it System Hooking ?) it'll determine have any new windows was created and raise event: Example (When notepad was opened- Notepad Window was created.It'll detech and raise event)
- Have same thing with specific Windows. Example: It'll determind Yahoo Messenger created new Yahoo Window Chatting (the windows use for chatting).

Thank you
0
BrendaMcMahon
Asked:
BrendaMcMahon
1 Solution
 
alienvoiceCommented:
Ok, so you want to write this program, what exactly are you asking us thou?
0
 
BrendaMcMahonAuthor Commented:
Yah.
I dunt know how to system hook in C# (in this case is "system hooking").
Would you mind help me a example like above ?
Thank you
0
 
mannujamCommented:
In normal case you can hook createwindow funtion, but every time so much amount of window are created that you can overload the hookproc and your system can hang. So you have to write a device driver for the same . This is not so straight forward process.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
BrendaMcMahonAuthor Commented:
.. uhm thank you. For wide system hooking looking it'll trouble.
But how about for specific window ? Like yahoo messenger.
I want to catch any window created by specific window ?

Thank you
0
 
CastorixCommented:
Simply WH_CBT (among all the standard methods...)
0
 
BrendaMcMahonAuthor Commented:
Would you mind give me a simply sample source code ?
Thax
0
 
mannujamCommented:
OK, go to this link,
 http://www.codeproject.com/KB/threads/procmon.aspx

There you can find the moniter for process execution.
I have used it and it is working fine.
0
 
BrendaMcMahonAuthor Commented:
Almost done with this.
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now