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
1.99k stars 84 forks source link

when wideCharOnly is true (default) specifying explicit ascii prefixed functions in NativeMethods.txt will result in it silently ignored #1157

Open mitchcapper opened 4 months ago

mitchcapper commented 4 months ago

Minor item:

Actual behavior

Add to a new project, put in NativeMethods.txt GetFinalPathNameByHandleA and compile. No warnings or errors are generated. No code is generated either.

Expected behavior

I get why with the defaults it wouldn't generate that function, but it may be worthwhile to see about adding a warning in this situation if someone explicitly lists something that is excluded. I am not sure if this is due the wildcard support.