Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CsWin32 doesn't use EntryPoints provided by metadata #968

Closed
riverar opened this issue Jun 20, 2023 · 0 comments · Fixed by #1110
Closed

CsWin32 doesn't use EntryPoints provided by metadata #968

riverar opened this issue Jun 20, 2023 · 0 comments · Fixed by #1110
Assignees
Labels
bug Something isn't working

Comments

@riverar
Copy link

riverar commented Jun 20, 2023

Actual behavior

Added a reference to custom metadata via ProjectionMetadataWinmd (see #356).

Metadata contains:

[DllImport("my.dll", EntryPoint = "#100", ExactSpelling = true, PreserveSig = false)]
public static extern ReturnType function();

CsWin32 generates:

[DllImport("my.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
internal static extern winmdroot.ReturnType function();

Expected behavior

CsWin32 to read/carry over the entry point as defined by metadata. This can differ from the function name (e.g. FileIconInit).

Repro steps

TBD

Context

  • CsWin32 version: [e.g. 0.3.2-beta]
  • Win32Metadata version (if explicitly set by project):
  • Target Framework: [e.g. net6.0-windows10.0.17763.0]
  • LangVersion (if explicitly set by project): [e.g. 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants