User32GetSystemDpiForProcess Method

Retrieves the system DPI associated with a given process.

This is useful for avoiding compatibility issues that arise from sharing DPI-sensitive information between multiple system-aware processes with different system DPI values.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static uint GetSystemDpiForProcess(
	IntPtr hProcess
)

Parameters

hProcess  IntPtr
The handle for the process to examine.

If this value is Zero, this API behaves identically to GetDpiForSystem.

Return Value

UInt32
The process's system DPI value.

Remarks

See Also