?
Solved

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

Posted on 2008-11-12
8
Medium Priority
?
527 Views
Last Modified: 2013-12-04
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
Comment
Question by:BrendaMcMahon
8 Comments
 
LVL 15

Expert Comment

by:alienvoice
ID: 22946435
Ok, so you want to write this program, what exactly are you asking us thou?
0
 

Author Comment

by:BrendaMcMahon
ID: 22947083
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
 
LVL 2

Expert Comment

by:mannujam
ID: 22947331
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:BrendaMcMahon
ID: 22947684
.. 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
 
LVL 2

Expert Comment

by:Castorix
ID: 22953935
Simply WH_CBT (among all the standard methods...)
0
 

Author Comment

by:BrendaMcMahon
ID: 22955288
Would you mind give me a simply sample source code ?
Thax
0
 
LVL 2

Accepted Solution

by:
mannujam earned 1500 total points
ID: 22970738
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
 

Author Comment

by:BrendaMcMahon
ID: 23203665
Almost done with this.
Thank you
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question