tags:

views:

825

answers:

5

Hello,

Has anyone else noticed that the WPF developer's best friend, Snoop, is not working on XP? I've tried Snooping Expression Blend (a WPF app) and other WPF apps too. Snoop finds them but doesn't launch the window when the binoculars button is pressed.

EDIT: I'm running obviously XP SP2 (with WPF support).

-pom-

+1  A: 

You have to be logged in as administrator for snoop to work. It is not enough to run snoop.exe as administrator, you have to actually login as administrator.

If you have the source code try changing the following line in injector.cpp

HANDLE hProcess = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, processID);

to

HANDLE hProcess = ::OpenProcess(PROCESS_VM_WRITE|PROCESS_VM_READ|PROCESS_VM_OPERATION, FALSE, processID);

What I have learned is that if you are Snooping an elevated application ... then you will need to run Snoop with elevated permissions as well.I have never seen a situation where you actually have to login as an admin. That is very curious. I would love to hear more about this. Better yet ... go start a discussion in the discussion area at http://snoopwpf.codeplex.com.
cplotts
+2  A: 

Snoop doesn't work on 64 bit platforms. Is your XP 64 bit?

Yuval Peled
It does now. :) See below.
cplotts
+1  A: 

Snoop will work on 64 bit systems. You just have to compile your executable to run in 32bit mode.

If using .NET, you can use the .NET tool corflags /32bit+ [executable] to mark your executable as 32 bit w/o recompiling.

Luke
This is what I was doing for a while (marking the application that I wanted to Snoop as 32-bit) ... and then eventually I got ticked off ... and fixed this.
cplotts
+4  A: 

I have worked on and gotten Snoop to work for both 64-bit platforms and for WPF 4.0. I have also obtained Pete Blois' permission to make these changes publicly available and to move Snoop to CodePlex.

See the following blog articles for more info (especially the last one which details all the other changes I have made to the code base):

You can download it from here: http://snoopwpf.codeplex.com/

cplotts
nice bump @cplotts
qntmfred
Hey, I know you ... thanks for the upvote. :)
cplotts
+1  A: 

There is another tool to inspect a running WPF application called WPF Inspector. It also includes some other nice features like trigger-debugging or a data context view.

You can download it from here: http://www.wpftutorial.net/inspector.html

Greetings
Christian

Christian Moser
I think I know you ... :)
cplotts