Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Aero Glass for Win8 RC4


  • This topic is locked This topic is locked
2630 replies to this topic

#1
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag

Topic closed at author's request - MSFN staff

 

Aero Glass for Win8 RC4
Hello,

maybe somebody will be interested in my small project. Therefore, I am sharing the first information about it. I have managed to reimplement Aero Glass function into Windows 8 Desktop Window Manager.

How does it work?
I have developed DLL library in C++ which is injected into dwm.exe process (no system files replacement is required). Then, the functions used for window border drawing are hooked with my own implementation. This ensures that anytime DWM wants to draw the window border, the code is redirected into my library where I change the drawing parameters and redirect back to the original drawing function. Transparent window border wih blur effect is drawn!

Is it completely new implementation?
Just a partially. Since a lot of Aero Glass resources is still present in Win8, I'm trying to reuse them as much as possible. The blur effect is implemented completely in Direct3D with using of native shaders and system settings. With some small exceptions, I just call the same commands as they would be called by Windows itself (e.g. in Win7 or Win8 RP).

The problem lies in loading library into memory, because - for correct function - it has to be loaded together with DWM process but before creation of its internal objects. Currently, the method of DLL injection via AppInit_DLLs registry key is used but it is not supported when UEFI secure boot is enabled.

http://glass8.berlios.de

--> registry script to install this utility is attached in the archive but you must manually edit the file to point to the location where you extract DLL file
--> the glass will automatically load at Windows startup
--> if your computer won't boot up for some reason (glass failure), hold CTRL key during DWM loading and no procedure will be installed into memory
--> if you use custom theme which has hardcoded fully opaque borders, the effect won't be visible
--> if there is any bug and DWM crashes, it will generate minidump file in the folder where you extracted DLL to and you should upload this minidump file to allow the bug to be fixed

--> this utility is for Windows 8 only! Testing version for Windows 8.1 will be available to closed private group only

--> THIS IS THE TEST VERSION, THUS IT LIMITS ITS REGULAR USAGE BY DISPLAYING WARNING MESSAGE PERIODICALLY. DO NOT ASK HOW TO REMOVE THIS MESSAGE !!!

--> THIS IS THE TESTING VERSION INTENDED FOR ADVANCED USERS ONLY, IF YOU ARE NOT ABLE TO UNDERSTAND THE INSTALLATION INSTRUCTIONS THEN YOU SHOULD NOT USE THIS SOFTWARE !!!

You use this software on your own risk and you agree that you will not use it against its purpose (testing and preview). You are not allowed to disassemble or crack this software by any method (binary modification, DLL injection, function hooking etc.) else you are violating the copyright, because you are trying to bypass software protection.

I hope you will like it :-)

Attached Files


Aero Glass for Win8.x --> http://www.glass8.eu


How to remove advertisement from MSFN

#2
vinifera

vinifera

    <°)))><

  • Member
  • PipPipPipPipPip
  • 963 posts
  • OS:Windows 7 x86
  • Country: Country Flag
go for it
many people using w8 will surely be thankfull
If you want true Windows user experience
try Longhorn builds: 3718, 4029, 4066

#3
xpclient

xpclient

    XP was my idea. 3rd party apps make NT6 my idea.

  • Member
  • PipPipPip
  • 331 posts
  • OS:XP Pro x64
  • Country: Country Flag
The blur effect looks nice!! What about the Taskbar and Windows Explorer title bars? :)

Edited by xpclient, 22 January 2013 - 10:41 PM.

Impossible to run NT6 without third party fixes.


#4
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 5,994 posts
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

awesome. Can I test it? Send me a PM, please :)
Posted Image

#5
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,931 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Totally awesome. I will help you with this if i can :rolleyes:

#6
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag

The blur effect looks nice!! What about the Taskbar and Windows Explorer title bars? :)


I have not played with the taskbar yet. But since the taskbar texture is easily identifiable it should not be so hard to add blur effect beneath the taskbar. To Explorer, Win8 Explorer has standard titlebar (unlike Win7) so it works as any other window. Maybe we could try to call DwmExtendFrameIntoClientArea on WinExplorer windows to see what happens :-)

Currently, I have two serious bugs to solve now then I will provide a test version:

1) To hook drawing functions properly, Direct3D device pointer must identified. It is easily possible by hooking D3D11CreateDevice (which provides pointer to D3D 11 device) and then device->QueryInterface (which provides pointer to D3D 10.1 device which is used for desktop composition). The problem is that DWM calls these two functions only on startup or when video adapter is restarted (e.g. via Device manager). I have not found a correct way to do it automatically. In Windows 7, this was possible by calling DwmEnableComposition(DISABLE...) and DwmEnableComposition(ENABLE...) but this has no effect on Windows 8.

2) Blur algorithm works by averaging the neighboring pixels. The problem is that pixels on the edge have no neighboring pixels on one side and therefore blurred pixel is computed from some random value. This is no problem for window edge because it won't be so noticeable there (you can notice it at my preview picture, upper edge of "O produktu Windows" window). The problem is when DWM wants to repaint only a part of window border. Then you will see these "edge pixels" at the edge of the clipped region (which can be e.g. in the middle of the titlebar).
Aero Glass for Win8.x --> http://www.glass8.eu

#7
hb860

hb860

    Newbie

  • Member
  • 16 posts
  • OS:ME
  • Country: Country Flag
This looks very promising :)

Edited by hb860, 23 January 2013 - 10:40 AM.

There is no good OS after Windows 2000.

#8
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 5,994 posts
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

I have not found a correct way to do it automatically. In Windows 7, this was possible by calling DwmEnableComposition(DISABLE...) and DwmEnableComposition(ENABLE...) but this has no effect on Windows 8.


this is "by design". Composition is always active in Windows 8:

http://msdn.microsof...0(v=vs.85).aspx

Note This function is deprecated as of Windows 8. DWM can no longer be programmatically disabled.


The service was removed and the DWM.exe started by the WinLongon.exe. If you kill the exe, the suer is logged off :(
Posted Image

#9
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag
No no, killing dwm.exe works here but it automatically restarts the process. I currently use this method but it's a little race whether it manages to hook Direct3D device creation function before DWM tries to do it.
Aero Glass for Win8.x --> http://www.glass8.eu

#10
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 5,994 posts
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

hm, when I tested termination of the DWM.exe I'm back at login screen. :blink:
Posted Image

#11
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag
Could you try running cmd.exe with admin privileges and command "taskkill /f /im dwm.exe" ?

The other possibility to restart Direct3D device is to open Device Manager, find videoadapter, select Disable for it and then re-enable. But I do not know how to easily automate this procedure in C++.
The correct solution would be getting existing pointer to ID3D11Device instance and hook it. But this is very complicated because you need also get all pointers to all pixel+vertex shaders and input layouts which are created with D3D device.

Or... the last solution which I want to avoid... to modify dwmcore.dll to load my library instead of D3D11.dll
Aero Glass for Win8.x --> http://www.glass8.eu

#12
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 5,994 posts
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

hmm, wired. Now DWM.exe is restarted. Last time I've checked it, it didn't worked.
Posted Image

#13
xpclient

xpclient

    XP was my idea. 3rd party apps make NT6 my idea.

  • Member
  • PipPipPip
  • 331 posts
  • OS:XP Pro x64
  • Country: Country Flag
Couldn't you use the console version of Device Manager, devcon.exe to disable and re-enable it? The W7 WDK has it, even source access. Here's is the stance on its licensing: http://social.msdn.m...9-6cbb4819730f/

Edited by xpclient, 24 January 2013 - 12:34 PM.

Impossible to run NT6 without third party fixes.


#14
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 5,994 posts
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

there is also a API to do this

SetupAPI.h

http://read.pudn.com/downloads62/sourcecode/windows/comm/217489/操作网卡/jyqywk.cpp__.htm
Posted Image

#15
KNARZ

KNARZ

    Junior

  • Member
  • Pip
  • 89 posts
great work!

and Tihiy may can also implement it in SiB ^^ ;)

#16
hb860

hb860

    Newbie

  • Member
  • 16 posts
  • OS:ME
  • Country: Country Flag
As well as Ivo Beltchev in Classic Shell
There is no good OS after Windows 2000.

#17
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag
I don't think this can be implemented in any application, because it is just a DLL which is loaded into dwm.exe process ;-)

I will also try whether AppInit_DLL thing works on Windows 8 for dwm.exe, this would be the best solution!
Aero Glass for Win8.x --> http://www.glass8.eu

#18
vladdsp

vladdsp
  • Member
  • 5 posts
  • OS:Windows 8 x64
  • Country: Country Flag

I will also try whether AppInit_DLL

Look here or here

Edited by vladdsp, 25 January 2013 - 05:23 AM.


#19
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,931 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

You may try as well injecting into winlogon and catching dwm.exe starting, injecting your DLL by the way. Or hijack some system CLSIDs which dwm uses, but that won't be much better than system file patching.

Also, when writing AppInit_DLL, make sure it does not link directly to user32.dll or libraries using it, otherwise it may fail to initialize (that was true in 2000 times).

Edited by Tihiy, 25 January 2013 - 05:30 AM.


#20
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag
It brings one main advantage. New fuctionality is added just by loading DLL and removed by its unloading. If you replace system file, then the only possibility is restoring the original file which does not have to be so easy to do it on-the-fly. Also, if you create some bug (e.g. crash) then injecting method only causes the restart of the process but file-patching method can kill whole system (and it took me really long time to force system to go into recovery options at boot).
Aero Glass for Win8.x --> http://www.glass8.eu

#21
trala

trala

    Newbie

  • Member
  • 14 posts
  • OS:Windows 7 x64
  • Country: Country Flag

If you kill the exe, the suer is logged off :(

Nice Freudian slip! :thumbup At least it points to how many of us feel about Microsoft taking out glass!

Edited by trala, 25 January 2013 - 08:34 AM.


#22
Linktopower

Linktopower

    Newbie

  • Member
  • 14 posts
  • OS:Windows 8 x64
  • Country: Country Flag
So I've just followed this from a MDL post, this is quite awesome I didn't think we would ever see the aero glass back.
I for would like to say to bigmuscle Congrats on bringing the Aero Glass back!.

But I have one question. Will this be able to be used on 32 Bit systems? or will it some how be limited to 64 Bit systems?.

Edited by Linktopower, 25 January 2013 - 12:11 PM.

Zelda Classic user
Proud member of: http://www.purezc.com/

#23
bigmuscle

bigmuscle

    Aero Glass for Win8 developer

  • Member
  • PipPipPipPipPip
  • 989 posts
  • OS:none specified
  • Country: Country Flag
Linktopower: I develop it on x64 system, but it should not be the problem to build 32bit library. I will post it with the preview version but can't ensure it will work.
Aero Glass for Win8.x --> http://www.glass8.eu

#24
Win2k3EE

Win2k3EE

    Member

  • Member
  • PipPip
  • 222 posts
bigmuscle congratulations on your project. If you'll succeed in your little project along with Tihyi's startisback - a lot of people will move to Win8...maybe even me. :)

#25
Linktopower

Linktopower

    Newbie

  • Member
  • 14 posts
  • OS:Windows 8 x64
  • Country: Country Flag

Linktopower: I develop it on x64 system, but it should not be the problem to build 32bit library. I will post it with the preview version but can't ensure it will work.

Ah, okay thanks for telling me. Alright then I'll be looking out for it when ever you post the the preview version.

Anyways keep up the good work will you. ;)
Zelda Classic user
Proud member of: http://www.purezc.com/




4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users



How to remove advertisement from MSFN