Spy: Monitoring Messages with SPY

This download link will create a sdktools\spy directory on your computer that will contain an includes header, Readme files and all the samples. It is recommended that you download all Spy samples via this link.

The Spy tool demonstrates how to monitor system messages sent to a specified window. Spy records the messages and displays them on the specified device. Spy is also useful in debugging, to verify that the messages you think a window is receiving are actually being received.

Spy demonstrates the following techniques:

  • Using a system message hook.

  • Using the WM_COPYDATA message to pass data to another application.

  • Reading and writing the registry.

  • Creating a thread.

  • Creating a DLL for the hook.

The Spy source files are described in the next topic, App.

Building SDK Samples