GetProcessDpiAwareness function

Retrieves the dots per inch (dpi) awareness of the specified process.

Syntax

HRESULT GetProcessDpiAwareness(
  HANDLE                hprocess,
  PROCESS_DPI_AWARENESS *value
);

Parameters

hprocess

Handle of the process that is being queried. If this parameter is NULL, the current process is queried.

value

The DPI awareness of the specified process. Possible values are from the PROCESS_DPI_AWARENESS enumeration.

Return Value

This function returns one of the following values.

Return code Description
S_OK
The function successfully retrieved the DPI awareness of the specified process.
E_INVALIDARG
The handle or pointer passed in is not valid.
E_ACCESSDENIED
The application does not have sufficient privileges.

Remarks

This function is identical to the following code:

GetAwarenessFromDpiAwarenessContext(GetThreadDpiAwarenessContext());

Requirements

   
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header shellscalingapi.h
Library Shcore.lib
DLL Shcore.dll

See Also

GetAwarenessFromDpiAwarenessContext

GetThreadDpiAwarenessContext

PROCESS_DPI_AWARENESS