GetProcessDpiAwareness function

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

Syntax


HRESULT WINAPI GetProcessDpiAwareness(
  _In_  HANDLE                hprocess,
  _Out_ PROCESS_DPI_AWARENESS *value
);

Parameters

hprocess [in]

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

*value [out]

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 codeDescription
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]

Header

ShellScalingAPI.h

Library

Shcore.lib

DLL

Shcore.dll

See also

GetAwarenessFromDpiAwarenessContext
GetThreadDpiAwarenessContext
PROCESS_DPI_AWARENESS

 

 

Show: