Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

ChangeWindowMessageFilter: what does this really do??

Closed Thread
 
Thread Tools Display Modes
Old 11-13-2006   #1 (permalink)
GSLockwood (IUnknown)
Guest


 

ChangeWindowMessageFilter: what does this really do??

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

Old 11-13-2006   #2 (permalink)
Jimmy Brush
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

Hello,

Have you installed the Windows SDK for Windows Vista and updated your Visual
Studio to reference the new SDK?

http://www.microsoft.com/downloads/d...displaylang=en

--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

Old 11-13-2006   #3 (permalink)
GSLockwood (IUnknown)
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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

george

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



"Jimmy Brush" wrote:

> Hello,
>
> Have you installed the Windows SDK for Windows Vista and updated your Visual
> Studio to reference the new SDK?
>
> http://www.microsoft.com/downloads/d...displaylang=en
>
> --
> - JB
>
> Windows Vista Support Faq
> http://www.jimmah.com/vista/
>

Old 11-13-2006   #4 (permalink)
Jimmy Brush
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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.

--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

Old 11-20-2006   #5 (permalink)
GSLockwood (IUnknown)
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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



"GSLockwood (IUnknown)" wrote:

> I'll get it now. thanks for the link!
> --
> Thanks so much,
>
> george
>
> _________________________
> George S. Lockwood
> Lead Client Developer
> peoplePC, an EarthLink company
>
>
>
> "Jimmy Brush" wrote:
>
> > Hello,
> >
> > Have you installed the Windows SDK for Windows Vista and updated your Visual
> > Studio to reference the new SDK?
> >
> > http://www.microsoft.com/downloads/d...displaylang=en
> >
> > --
> > - JB
> >
> > Windows Vista Support Faq
> > http://www.jimmah.com/vista/
> >

Old 11-21-2006   #6 (permalink)
Jimmy Brush
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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.


--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

Old 11-21-2006   #7 (permalink)
GSLockwood (IUnknown)
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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

--
Thanks so much,

george

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



"Jimmy Brush" wrote:

> 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.
>
>
> --
> - JB
>
> Windows Vista Support Faq
> http://www.jimmah.com/vista/
>

Old 11-27-2006   #8 (permalink)
GSLockwood (IUnknown)
Guest


 

Re: ChangeWindowMessageFilter: what does this really do??

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



"GSLockwood (IUnknown)" wrote:

> Actually I have (".\User32.lib")
>
> --
> Thanks so much,
>
> george
>
> _________________________
> George S. Lockwood
> Lead Client Developer
> peoplePC, an EarthLink company
>
>
>
> "Jimmy Brush" wrote:
>
> > 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.
> >
> >
> > --
> > - JB
> >
> > Windows Vista Support Faq
> > http://www.jimmah.com/vista/
> >

Closed Thread

Thread Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50