Subclassing DLL

Subclassing the procedure of any foreign window.
Download

Subclassing DLL Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Free
  • Publisher Name:
  • Nadeem Afanah
  • Publisher web site:
  • Operating Systems:
  • Windows Me, Windows 98, Windows 95, Windows 2000, Windows NT, Windows XP
  • File Size:
  • 146.56K

Subclassing DLL Tags


Subclassing DLL Description

Purpose of the DLL: Subclassing the procedure of any foreign window, so the DLL sends a copy for each message to your application. Also, you can modify or suppress the message (Prevent a message from being sent to its original window procedure). What is Subclassing? How does the DLL work? Subclassing is a technique that allows an application to intercept messages destined for another window. When an application subclasses a window, it substitutes the original window procedure with a new one, and the new procedure can take three actions with any message: Pass the message to the original window procedure. Modify the message and pass it to the original window procedure. Not pass the message (suppress it). The SetWindowLong()function is used to subclass an instance of a window. But this only works if the window you are subclassing belongs to your process (private address space). What if you want to subclass a window that belongs to another process? There must be a solution for this problem. The DLL can handle this; It sets a system wide hook in the thread of the target window, then the DLL is injected into the target process memory, Now SetWindowLong() is called from within the DLL, the new subclassing procedure resides in the DLL. When any message is trapped, it is sent to the calling application by calling "SendMessage()" or “SendNotifyMessage()“


Subclassing DLL Related Software