microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.
MIT License
2k stars 84 forks source link

HRESULT_FROM_WIN32 #1010

Closed Nuklon closed 11 months ago

Nuklon commented 11 months ago

Not entirely sure if it should be posted here or in CsWin32, but this macro would be useful to add (perhaps in HRESULT).

riverar commented 11 months ago

Your instincts are correct, this is a projection-specific request. (For example, here's what Rust does.)

Perhaps @AArnott can transfer this issue to avoid having to create another?

AArnott commented 11 months ago

CsWin32 can already generate HRESULT_FROM_WIN32. You just have to ask for it in your NativeMethods.txt file.

Nuklon commented 11 months ago

Hmm, it didn't get generated for me last time, but it does now, thanks :)