Latest ScrnSave.Lib depends on ChangeWindowMessageFilter

I was trying to port a screensaver from Visual Studio 2005 to Visual Studio 2008.

After loading the project in VS2008, compilation went without any problems. However, when I tried to test the screensaver on a Windows XP box I got the error message that the function ChangeWindowMessageFilter could not be found in user32.dll. The first thing I did was to open the MSDN and search for this ChangeWindowMessageFilter function. According to the documentation ChangeWindowMessageFilter is only available on Windows Vista. I obviously didn’t use that function myself otherwise I would have known about it in the first place 😉 So I checked the libraries that I was linking to. The most obvious candidate would be the ScrnSave.lib library. I searched for it and it was linking to the version that was installed by Visual Studio 2008 in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib. To make sure I did a “dumpbin /symbols ScrnSave.Lib” on it and it was indeed using the ChangeWindowMessageFilter function.

It is pretty strange that this ScrnSave.Lib is dependent on a Vista API call. This just annoys developers that try to create a screensaver that still works on Windows XP. It should be pretty easy for the developers of ScrnSave.Lib to dynamically load the user32.dll and see if ChangeWindowMessageFilter is available.

Anyway, the easiest and quickest workaround that I’m using right now is to use the ScrnSave.Lib from the Visual Studio 2005 installation. After recompiling my screensaver with this older library it works again on Windows XP.

Share

4 Comments so far »

  1. Dirk Ruys said,

    Wrote on June 5, 2008 @ 12:52 pm

    I’m having exactly the same problem! Is there a solution (besides using the 2005 ScrSave.lib)?

  2. Marc Gregoire said,

    Wrote on June 5, 2008 @ 3:16 pm

    No, I didn’t look for another solutions since simply linking with the ScrnSave.Lib installed by Visual Studio 2005 works for me. However, I am still interested in a clean Visual Studio 2008 solution that doesn’t require this file from Visual Studio 2005. So if anyone knows, let me know.

  3. mouse said,

    Wrote on October 4, 2008 @ 8:17 pm

    is there any place i can download this lib..ive downloaded 2k5 express but no luck..it cant even find windows.h …all i really need is the lib…any help would be really awesome!

  4. Marc Gregoire said,

    Wrote on October 5, 2008 @ 8:37 am

    I’m not sure. Maybe it’s in the Windows SDK which you can download from http://msdn.microsoft.com/en-us/windowsvista/bb980924.aspx .

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: