0

I have tried every single manifest example under the sun in order to get my small application to scale properly (on Windows 8.1). Here's my latest attempt, for example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
  <asmv3:application>
    <asmv3:windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
    </asmv3:windowsSettings>
  </asmv3:application>
</assembly>

Absolutely nothing has worked. So I was wondering if there's something else that needs to be done. My application is a COM Dll that's loaded out of process via DllSurrogate. Is there something else that should be added (maybe a commmand line flag or something) in order to get awareness to kick in? Calling SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE) does work, actually, but the docs discourage making API calls in lieu of the manifest approach. Thank you for any help!

  • It seems that there is no problem with the content of manifest. Did you embed the manifest in the resource file correctly? If it still doesn't work, please refer to [this thread](https://stackoverflow.com/a/26854131/11128312). – Strive Sun Apr 08 '21 at 03:28
  • 2
    Don't think you can do this from a .dll. You must change the |surrogate].exe's application manifest. – Simon Mourier Apr 08 '21 at 04:39
  • I assume that's not possible. So do you think it's a better idea to (a) still use DllSurrogate, but call `SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE)`, or (b) implement the COM server in an .exe? –  Apr 08 '21 at 20:16

0 Answers0