Dart:ffi – 'must be a subtype' for 'lookupFunction' issue for native code in dart

Issue The type ‘Uint32 Function(IntPtr, Pointer<Uint32>)’ must be a subtype of ‘int Function(IntPtr, Pointer<Uint32>)’ for ‘lookupFunction’. class Psapi { static final ffi.DynamicLibrary psapi = ffi.DynamicLibrary.open(‘psapi.dll’); static int GetWindowThreadProcessId( ffi.IntPtr hwnd, ffi.Pointer<ffi.Uint32> lpdwProcessId) { return psapi.lookupFunction<ffi.Uint32 Function(ffi.IntPtr hwnd, ffi.Pointer<ffi.Uint32> lpdwProcessId), int

Continue reading