Closed Aaswin1996 closed 11 months ago
tip: use 3 backticks with a cs
after them, on their own line, to delineate c# code blocks for better formatting in github.
using Microsoft.Windows.SDK <- this cannot be imported says windows does not exist in namespace microsoft ;
If that's the problem you're calling out, you're using the wrong namespace. The namespace we generate into is Windows.Win32
.
When in doubt, try using Go To All (Ctrl-T) on the identifier you entered into NativeMethods.txt
and C# will jump you to the code generated API so you can inspect its namespace.
Actual behavior
Trying to use CSWin32 to do some Pinvoke calls but my imports are throwing an error
Expected behavior
Should be able to call Pinvoke
Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Any of your own code that should be shared?
Context
LangVersion
(if explicitly set by project): [e.g.9
]