GetSystemDpiForProcess function Null safety user32

int GetSystemDpiForProcess (
  1. int hProcess
)

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.

UINT GetSystemDpiForProcess(
  HANDLE hProcess
);

Implementation

int GetSystemDpiForProcess(int hProcess) {
  final _GetSystemDpiForProcess = _user32.lookupFunction<
      Uint32 Function(IntPtr hProcess),
      int Function(int hProcess)>('GetSystemDpiForProcess');
  return _GetSystemDpiForProcess(hProcess);
}