SetProcessDpiAwareness error code
<p>I'm adding a call to the SetProcessDpiAwareness windows function as the first thing in my Delphi XE7 application (after dynamically loading the shcore DLL). I know it is preferable to use a manifest to set the DPIAware value and I've got that working separately and will use it eventually. However during development I want to use a command line parameter to set DPIAwareness value, otherwise I have to rebuild the app to change this status.</p>

<p>The problem is that SetProcessDpiAwareness returns the error code $800700A0.
That is not documented in the function description, what does the code mean?</p>

<p>Ah I've found it, thanks to the answer to look at the parameter, I had declared the function type wrong, I had:</p>

<p>TSetDPIFunc = function (const PROCESS_DPI_AWARENESS) : HRESULT; stdcall;</p>

<p>but PROCESS_DPI_AWARENESS was not defined as an enum.
Changed to the following and it now works fine:</p>

<p>TSetDPIFunc = function (const x: Integer) : HRESULT; stdcall;</p>