microsoft / microsoft/win32metadata
Functions in `windows::Win32::Graphics::Gdi` should return `Result`
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 149
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Description
In `windows::Win32::Graphics::Gdi`, there are many functions like [`CreateSolidBrush()`](https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Gdi/fn.CreateSolidBrush.html), [`CreateBitmap()`](https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Gdi/fn.CreateBitmap.html), [`CreateBitmapIndirect()`](https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Gdi/fn.CreateBitmapIndirect.html), [`CreateEllipticRgn()`](https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Gdi/fn.CreateEllipticRgn.html) etc. that return handles, although the docs at [learn.microsoft.com](https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createsolidbrush) say, they can fail. So, they should return `Result`s like many other fallible functions in the `windows` crate already do.
Contributor guide
Research direction
Start with the listed GDI entry points, including CreateSolidBrush(), CreateBitmap(), CreateBitmapIndirect(), and CreateEllipticRgn(), and compare their Microsoft documentation with the existing fallible functions in the windows crate. Done means the affected functions in windows::Win32::Graphics::Gdi return Result values consistently with their documented failure behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100