LookupIconIdFromDirectoryEx function user32

Win32Result<int> LookupIconIdFromDirectoryEx(
  1. Pointer<Uint8> presbits,
  2. bool fIcon,
  3. int cxDesired,
  4. int cyDesired,
  5. IMAGE_FLAGS flags,
)

Searches through icon or cursor data for the icon or cursor that best fits the current display device.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-lookupiconidfromdirectoryex.

Implementation

Win32Result<int> LookupIconIdFromDirectoryEx(
  Pointer<Uint8> presbits,
  bool fIcon,
  int cxDesired,
  int cyDesired,
  IMAGE_FLAGS flags,
) {
  final result_ = LookupIconIdFromDirectoryEx_Wrapper(
    presbits,
    fIcon ? TRUE : FALSE,
    cxDesired,
    cyDesired,
    flags,
  );
  return Win32Result(value: result_.value.i32, error: result_.error);
}