ChangeWindowMessageFilter: what does this really do??

G

Guest

Hello,

I believe I have the situation where a "low" privileged app is sending
windows messages to an IE7 in protected mode and thereby the messages are not
allowed to pass thru.

How can I get these messages to be allow to pass?

Is ChangeWindowMessageFilter the answer?

I've tried to implement this but cannot get it to compile. Errors:

'MSGFLT_ADD' : undeclared identifier
and
'ChangeWindowMessageFilter': identifier not found


Where is this api defined? Documentation says Declared in Winuser.h,
include Windows.h but apparently not in the version I have....

I am running Visual Studio 2005.

--
Thanks so much,

george

_________________________
George S. Lockwood
Lead Client Developer
peoplePC, an EarthLink company
 
G

Guest

I'll get it now. thanks for the link!
--
Thanks so much,

george

_________________________
George S. Lockwood
Lead Client Developer
peoplePC, an EarthLink company
 
J

Jimmy Brush

I forgot to answer your first question ...
I believe I have the situation where a "low" privileged app
is sending windows messages to an IE7 in protected mode
and thereby the messages are not allowed to pass thru.

Vista prohibits applications of different integrity levels from sending most
windows messages between each other. IE in protected mode runs in LOW
integrity; normal applications run in MEDIUM; and programs running with
administrator privileges run as HIGH. (There is also a SYSTEM level for some
system services).

ChangeWindowMessageFilter allows an application in a higher integrity level
to specify additional windows messages that it wants to accept from
applications running in a lower privilege level.

For example, if you run say NOTEPAD.exe, it will have a MEDIUM integirty
level. If you then run an administrative application, let's use task
scheduler as an example, it will run with HIGH integrity level.

notepad is isolated from task scheduler because they are running in
different integrity levels; the system prevents notepad from sending task
scheduler most window messages, prevents it from injecting code into task
scheduler via hooks, prevents it from writing into its process memory, etc,
etc, because of the difference in integrity level.

The ChangeWindowMessageFilter api can be used in this example by task
scheduler to allow it to receive additional window messages from notepad.
 
G

Guest

I downloaded the new SDK and installed it.

To make things easier, I just got the definition of
ChangeWindowMessageFilter from its file in the new "v6.0" include file.

I then copied the User32.lib from the "v6.0" lib dir into my project's dir.

and I'm getting a link error (unresolved external).

So apparently it is not found in User32.lib ??

Is there a reason I cannot build this on a WinXP SP2 system?



--
Thanks so much,

george

_________________________
George S. Lockwood
Lead Client Developer
peoplePC, an EarthLink company
 
J

Jimmy Brush

It should compile fine on XP. I don't think the linker looks inside your
project's dir for lib files by default. Try telling the linker the exact
location of the lib file (path and filename) using the project's settings.
 
G

Guest

Actually I have (".\User32.lib")

--
Thanks so much,

george

_________________________
George S. Lockwood
Lead Client Developer
peoplePC, an EarthLink company
 
G

Guest

Jimmy,

Thanks, you are very helpful!

The problem was in the WINVER being defined as 0x501 rather than the 0x600
that the header file insists on!

Compiles and links!

But I'm getting a error #5 which usually means access denied. Since there
really is no documentation --MSDN doesn't go into error codes for this API--
what would you suggest?

<<<<< btw: Is there a link to GREAT and new documentation (read as is there
a new MSDN library?) for the changes and new things in Vista?>>>>>


But access to what is denied?


I am calling ChangeWindowMessageFilter from a toolbar sitting on top / in
IE7 and trying to SendMessage to another process (to get its response). So,
I have added the following line:

ChangeWindowMessageFilter( UM_ACCELERATION_STATUS, MSGFLT_ADD );

UM_ACCELERATION_STATUS is defined as 13030

I think I'm trying to play ball here.....


--
Thanks so much,

george

_________________________
George S. Lockwood
Lead Client Developer
peoplePC, an EarthLink company
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top