#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Thumbs up Help me defeat Windows 7 Aero Flip in C#


    Since it's in use by the OS, this should be a hook like process and be similar to PInvoke. What I'm trying to do is provide myself with total control of the Aero Flip 3D functions (size, shape, location, rotation, that sort of thing) -Why is this not already heavily posted on the internet?

    I've done the research that I can and have been looking over the one C++ version i've found online (won't compile x3501 error + others)

    here is what i know, i forgot some, but here's basically the start
    pinvoke.net : dwmapi.dll
    youtube.com/watch?v=1lLgUqGjDBk Source I mentioned, w/ their demo video

    If someone could help this would be fantastic, I'm doing what I can to apply my knowledge to convert the C++ to C#, but I doubt I could fully do it alone. Maybe a pastebin would work? Is there a better place to drop a source code that can be edited by others?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    187
    Rep Power
    82
    I'm just not sure I fully understand what you're trying to do. It appears that you are trying to develop a kernel level hook to "bypass" DWM. But AFAIK, DWM can be controlled on the application level. For example,

    Code:
    using System;
    using System.Runtime.InteropServices;
    
    public static class Composition
    {
        const uint DWM_EC_DISABLECOMPOSITION = 0;
        const uint DWM_EC_ENABLECOMPOSITION = 1;
    
        [DllImport("dwmapi.dll", EntryPoint = "DwmEnableComposition")]
        extern static uint DwmEnableComposition(uint compositionAction);
        static void Main()
        {
            EnableComposition(true);
        }
    
        public static bool EnableComposition(bool enable)
        {
            try
            {
                if (enable)
                {
                    DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
                }
                else
                {
                    DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
                }
                return true;
            }
            catch
            {
                return false;
            }
        }
    }
    But anyway, post your code here, pastebin or wherever and we'll take a look.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Everything I know tells me it should be application level, but I've asked a dozen people and they say Aero wasn't made public therefor it's not so simple..

    From my experience though anything that comes with the OS itself, should be readily accessible, modifiable, and applicable.

    en.wikipedia.org/wiki/Desktop_Window_Manager
    "Windows Flip 3D does not use the public thumbnail APIs as they do not allow for directly accessing the Direct3D textures.[7] Instead, Flip 3D is implemented directly in the DWM engine."

    --edit two--found more on wiki
    milcore.dll : DWM uses the Media Integration Layer
    1. The Desktop Window Manager uses Media Integration Layer (MIL), the unmanaged compositor which it shares with Windows Presentation Foundation, to represent the windows as composition nodes in a composition tree.
    2. Since MIL provides a retained mode graphics system by caching the composition trees, the job of repainting and refreshing the screen when windows are moved is handled by DWM and MIL, freeing the application of the responsibility. The background data is already in the composition tree and the off-screen buffers and is directly used to render the background. (WM_PAINT) MESSAGE : which i've found can be a pain in the past.


    I'm looking more specifically to creating a new Aero Flip 3D-like experience.. with multiple renditions of the Aero Flip running (custom styles of course: shapes(smaller), location, and different rotation).

    edited: So they're not exactly thumbnails.. I'm going to try to exercise the available dwmapi PInvokes fully and get back tomorrow.

    Originally Posted by BobS0327
    I'm just not sure I fully understand what you're trying to do. It appears that you are trying to develop a kernel level hook to "bypass" DWM. But AFAIK, DWM can be controlled on the application level. For example,


    But anyway, post your code here, pastebin or wherever and we'll take a look.
    Last edited by whobop; February 1st, 2013 at 10:05 PM. Reason: Edited: read the wiki: not exactly thumbnails?...

IMN logo majestic logo threadwatch logo seochat tools logo