microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't import Windows.Win32.System.Threading

mwisnicki opened this issue · comments

Actual behavior

I can't get OpenProcess by referencing namespace Windows.Win32.System.Threading in NativeMethods.txt.
It works with plain OpenProcess as well as fully qualified Windows.Win32.System.Threading.OpenProcess.

Expected behavior

Namespace reference should work as per readme.

Repro steps

  1. NativeMethods.txt content:
Windows.Win32.System.Threading
  1. Any of your own code that should be shared?
Windows.Win32.PInvoke.OpenProcess(Windows.Win32.System.Threading.PROCESS_ACCESS_RIGHTS.PROCESS_QUERY_INFORMATION, false, 1);

Context

  • CsWin32 version: 0.3.49-beta
  • Target Framework: net8.0-windows

I can't reproduce this with 0.3.85-beta.