free web page counters

Windows Mobile Pocket PC Smartphone Programming

==>Click here for the SiteMap<==. Original contents with decent amount of source codes.

Wednesday, April 19, 2006

Internal Use Spy: A nice hidden debugging tool for Pocket PC 2003 device and Pocket PC 5.0 device

====>SiteMap of this Blog<===

Internal Use Spy: A nice hidden debugging tool for Pocket PC 2003 device and Pocket PC 5.0 device

On Apr. 13, 2006, I talked about the usage of Remote CE Spy and how to overcome the broken Remote CE Spy shipped with Visual Studio 2005. Specifically, the Remote Spy displays a list of the windows that are open on a target device. In a separate window, the tool displays information about the messages in the message queue for the selected window.

Remote CE Spy is a very powerful tool for any UI-related programming job. However, the tool requires the target device must be ActiveSync'ed with the desktop PC. What if you do not have access to a PC? With only the physical device, can you discover similar information on the fly, like the window handle, class, style, size, and etc?

Recently when I was playing with my PPC6601 (2003 SE) device, I found such a hidden tool called "Internal Use Spy". The way to bring it up is like this:

  • Press (and Hold) the Action key
  • Tap the top title bar where nothing is displayed (to the right of title string, and to the left of notification icon)

A dialog will popup, listing the current window's handle, style, title, client area position and size. Further, it shows the handle of the parent window, and offers a choice to further dump the properties of the parent window. The following screen cut is for "Microphone AGC" applet in the Control Panel Settings:

Internal Use Spy Screen dump

Wrap Up

I tested in my PPC6700 device, a Windows Mobile 5.0 device. It also works. It seems both Pocket PC 2003 device and Pocket PC 5.0 device have the hidden tool built-in.

The emulator does not expose the same. In the emulator, supposedly one can press and hold the PC's CTRL key to simulate the behavior of pressing and holding Action key in real devices. However, the Internal Use Spy dialog simply does not show up.

For a related post on the hidden trick without connecting the device to a desktop PC, read "how to launch a program via command line in Pocket PC 2003 device and Pocket PC 5.0 device".

====>SiteMap of this Blog<===