[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dark mode on Windows

From: Eli Zaretskii
Subject: Re: Dark mode on Windows
Date: Mon, 25 Oct 2021 19:34:15 +0300

> From: Vince Salvino <salvino@coderedcorp.com>
> CC: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
> Date: Mon, 25 Oct 2021 15:44:05 +0000
> I understand that linking -ldwmapi will shut out XP and earlier, so am trying 
> to find a solution around that. Will report back with any findings after 
> playing with it a bit.

We already have the solution for that, and we use it with many
features that are only available on newer Windows versions.  There are
many examples in w32*.c files, but just to give you one such example,
look at w32.c:open_process_token, which is used to call
OpenProcessToken when it's available and gracefully report failure
when it isn't.

If you need several functions from dwmapi.dll, not just one, try using
the DEF_DLL_FN and LOAD_DLL_FN macros; a good example is in
w32uniscribe.c, where we dynamically load HarfBuzz if it's installed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]