SHCore SetProcessDpiAwareness vs user32 SetProcessDpiAwarenessContext


We’ve had a Wotja app update rejected by the Microsoft Store earlier today:

Warning: The DPI-awareness validation test detected following Warnings:
File ***.exe neither has PerMonitorV2 manifested in the manifest nor calls into DPI Awareness APIs for ex: user32!SetProcessDpiAwarenessContext or user32!SetThreadDpiAwarenessContext.

This is quite annoying, as of course Juce does call DPI Awareness APIs, but through SetProcessDpiAwareness … (in SHCore.dll).

The rejection happened very quickly; I suspect they’ve added an automated check, and the check doesn’t cover all routes to DPI Awareness checking. :frowning:

Is Juce going to be changed to call SetProcessDpiAwarenessContext in user32 to deal with this…?

Thanks, and best wishes to all,


Just to note… I found this:

If you don’t already have an assembly manifest in your project, add a new XML file to your project and name it app.manifest.
In your assembly manifest, include the compatibility element and the child elements shown in the following example. Replace the Id attribute of the maxVersionTested element with the version number of Windows 10 you are targeting (this must be Windows 10, version 1903 or a later release).

So, I took their example and added a dpiAwareness section inside WindowsSettings … see

<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
            <!-- Windows 10 -->
            <maxversiontested Id="10.0.18362.0"/>
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
              <dpiAwareness xmlns="">PerMonitorV2</dpiAwareness>

I hope this alternative approach works :slight_smile:


… and it is still rejected! :frowning:

Did you get anywhere on this?

I have been fighting this all day. Ive tried everything i can think of.

I opened a ticket with microsoft.

Im thinking its a bug with them.
I just did a release last week and it was fine, today, this…

I just heard back on my microsoft ticket. looks like it is a microsoft problem, they responded with this:

“Thank you for reporting this. We are looking into it. We will get back to you when we know more.”

Which means its something on their end.

FYI: I am not a JUCE user, my program is not related, its in Visual Studio/ c#. I just found this thread when googling for the problem.

1 Like

Hi! Very interesting to hear from you.

We have two apps variants, basically a Pro version and a Free version, built with the same code base.

Bizarrely, one of them passed certification, and the other one didn’t!

Microsoft are currently passing me around, I’ve yet to get traction with their developer support for this issue.

With best wishes,


apparently, i am limited to 3 replies per topic.

if bounced out again. im going to try putting the high DPI stuff back in.

I think they fixed it.

I submitted my app this morning and its been in certification for over 2 hours, yesterday it was bouncing out after a few minutes.

might want to give yours a try


Thanks for the tip Karl - I’ll try it again now! :slight_smile: Pete

It didn’t work - same reason. Oh well! Pete

Many thanks to Karl @iddgroup or his suggestions, which led to the following solution, which did work!

Changes shown are to juce_win32_Windowing.cpp


typedef BOOL(WINAPI* SetProcessDpiAwarenessContextFunc) (DPI_AWARENESS_CONTEXT);
static SetProcessDpiAwarenessContextFunc setProcessDpiAwarenessContext = nullptr;

static void setDPIAwareness()
    // MPC BEGIN!
    if (setProcessDpiAwarenessContext  == nullptr) {
      HMODULE user32Module = GetModuleHandleA("User32.dll");
      // This is not available in all Windows 10 SDKs...
      setProcessDpiAwarenessContext = (SetProcessDpiAwarenessContextFunc)GetProcAddress(user32Module, "SetProcessDpiAwarenessContext");
      if (setProcessDpiAwarenessContext != nullptr) {
    // MPC END!

    if (JUCEApplicationBase::isStandaloneApp())

@jules I’d suggest the team add this to the code base, it might well help others … Pete

Your Welcome!

I did open a ticket with microsoft, it is clearly an issue on their end.

They did say there was something going on, but its not happening with everyone.


Thanks again Karl!

I complained after being sent pillar to post by them, and was then told that they’re investigating - but have heard nothing else.

Anyhow the workaround seems fine, so onwards and upwards!


Had a response from Microsoft - “There was an issue with the WACK test that should be resolved now. Sorry for the inconvenience.”. Better late than never :slight_smile: Pete

1 Like


yes, I just resubmitted my original source and it was approved.

Cool :slight_smile: