Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6616561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:35:51+00:00 2026-05-25T20:35:51+00:00

Been trying to use the following code in order to check if Windows Aero

  • 0

Been trying to use the following code in order to check if Windows Aero is enabled:

function AeroEnabled: boolean;
var
  enabled: bool;
begin
 // Function from the JwaDwmapi unit (JEDI Windows Api Library)
 DwmIsCompositionEnabled(enabled);
 Result := enabled;

end;

 ...

 if (CheckWin32Version(5,4)) and (AeroEnabled) then
 CampaignTabs.ColorBackground   := clBlack
 else begin
 GlassFrame.Enabled             := False;
 CampaignTabs.ColorBackground   := clWhite;
 end;

However, doing so on a pre-vista machine causes the app to crash because the DWMApi.dll is missing. I’ve also tried this code however it produces 2 AV’s in a row. How can I do this ? I am using Delphi 2010. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:35:52+00:00Added an answer on May 25, 2026 at 8:35 pm

    You’ve got your versions wrong. Vista/2008 server are version 6.0. Your test should be:

    CheckWin32Version(6,0)
    

    I believe that you are using Delphi 2010 or later in which case you should simply call the DwmCompositionEnabled function from the built-in Dwmapi unit. This organises the version check and the delayed binding for you. No need for JEDI.


    Edit: Text below was written before the question was edited.

    Probably the easiest approach is to check the Windows version. You need Win32MajorVersion>=6 (i.e. Vista or 2008 server) in order to call DwmIsCompositionEnabled.

    If you were binding yourself then you would call LoadLibrary with DWMApi.dll and if that succeeded you would then call GetProcAddress to bind. If that succeeded you are good. But, as I said, since you aren’t handling the binding yourself then a version check is probably the simplest.

    So the function would be:

    function AeroEnabled: boolean;
    var
      enabled: bool;
    begin
      if Win32MajorVersion>=6 then begin
        DwmIsCompositionEnabled(enabled);
        Result := enabled;
      end else begin
        Result := False;
      end;
    end;
    

    Note, I’m assuming that your library is doing late binding, i.e. explicit linking. If not then you’ll need LoadLibrary/GetProcAddress, exactly as is done in @RRUZ’s code to which you link.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the following code, which I have not been able
I've been trying to use the new jquery-ui, and all but the resizable function
I've been trying to use TeamCity 4.5 in order to automate builds of an
I'm getting terribly slow results from the following code. I've been trying to troubleshoot
I am trying to use following code to retrieve character index by position in
I have been trying to look for a reason why the following code is
I've been trying to use SQLite with the PDO wrapper in PHP with mixed
I have been trying to use the Perl utility/module "prove" as a test harness
I've been trying to use WF in my ASP.NET application (actually, it's ASP.NET MVC
I have been trying to use a formula that is used to work out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.