3

I am attempting to adapt an application developed in VS 2008/C# that listens to another application's WM_ messages through the use of the Control.WndProc method. When the "app.exe" version is run, WM_USER messages are visible and processed; however when the "app.vshost.exe" version is run, these same messages are no longer visible to the application and thus not processed. It appears that both the ".exe" and "vshost.exe" versions recieve other WM_ messages (through placing a break on WndProc, however the WM_USER messages can't be trapped in the "vshost.exe" version. The application's Security settings is set to be a "full-trust application".

To make things more confusing, when I moved the same source code to another computer, the second computer was able to see and process the WM_USER messages for both the "app.exe" and "app.vshost.exe" versions, which leads me to believe that it is an environment issue in my development computer.

Could anyone please steer me as to what could be unique about my development environment that could account for the difference in the visibility of WM_USER messages?

Bill
  • 335
  • 1
  • 4
  • 21
  • 1
    Are you running Visual Studio as an administrator on the one that doesn't work? Vista? If so, don't run Visual Studio as Administrator. – Dean Harding Apr 20 '10 at 13:44
  • Codeka - Thank you - you were exactly right. I was running VS/2008 with Windows 7. When I ran VS as an ordinary user without adminstrator privleges, the app.vshost.exe version was able to see the WM_USER messages. Thank you for your help. Bill – Bill Apr 20 '10 at 14:28
  • @Dean: you might want to move your comment into an answer, to remove this question from the "no answers" list. – Michel de Ruiter Nov 11 '10 at 09:01

1 Answers1

2

If you are running Visual Studio as an administrator on the one that doesn't work, and this is Windows Vista, then the solution is to not run Visual Studio as Administrator.

Dean Harding
  • 71,468
  • 13
  • 145
  • 180