microsoft / microsoft/CsWin32

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

Open
#1,157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
2.5k
Forks
124
Avg merge
1d 3h
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in a new C# project with GetFinalPathNameByHandleA listed in NativeMethods.txt while wideCharOnly remains true. Trace how explicit NativeMethods.txt entries are filtered, including wildcard handling. Done means the explicitly excluded function no longer disappears silently and the resulting behavior matches the issue's expected warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.