LookupIconIdFromDirectory function user32

Win32Result<int> LookupIconIdFromDirectory(
  1. Pointer<Uint8> presbits,
  2. bool fIcon
)

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-lookupiconidfromdirectory.

Implementation

Win32Result<int> LookupIconIdFromDirectory(
  Pointer<Uint8> presbits,
  bool fIcon,
) {
  final result_ = LookupIconIdFromDirectory_Wrapper(
    presbits,
    fIcon ? TRUE : FALSE,
  );
  return .new(value: result_.value.i32, error: result_.error);
}