You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To workaround a previously reported issue, I copied/pasted CsWin32 generated output into a separate .cs and compiled it with my app. To resolve PCSTR references, I added Windows.Win32.Foundation.PCSTR to the NativeMethods.txt. This results in the confusing error below:
error PInvoke007: The API "Windows.Win32.Foundation.PCSTR" is ambiguous.
Please specify one of: "Windows.Win32.Foundation.PCSTR", "Windows.Win32.Foundation.PCSTR" or "Windows.Win32.Foundation.PCSTR".
Expected behavior
A clear error or no error at all.
Repro steps
TBD
Context
CsWin32 version: [e.g. 0.3.2-beta]
Win32Metadata version (if explicitly set by project):
Usually PCSTR will be brought in transitively. But if you own the only code that references it, you'll have to request it as you've done here. But PCSTR is a special type that doesn't appear in the metadata. That, and our recent support for multiple metadata files, may be why CsWin32 is misreporting an ambiguity. when you ask for it.
Actual behavior
To workaround a previously reported issue, I copied/pasted CsWin32 generated output into a separate .cs and compiled it with my app. To resolve PCSTR references, I added
Windows.Win32.Foundation.PCSTR
to theNativeMethods.txt
. This results in the confusing error below:Expected behavior
A clear error or no error at all.
Repro steps
TBD
Context
0.3.2-beta
]net6.0-windows10.0.17763.0
]LangVersion
(if explicitly set by project): [e.g.9
]The text was updated successfully, but these errors were encountered: