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

Exported name mismatched #129

Closed
Executor-Cheng opened this issue Dec 13, 2019 · 5 comments
Closed

Exported name mismatched #129

Executor-Cheng opened this issue Dec 13, 2019 · 5 comments
Labels
Milestone

Comments

@Executor-Cheng
Copy link

Using v1.7-beta2, checked Use our IL Assembler, TargetFramework=netcoreapp3.1, the following method will be exported as "Test", not "test123".

[DllExport("test123", CallingConvention.StdCall)]
public static int Test()
    => 0;

But if I use CallingConvention.Cdecl, the exported name will be "test123".

@3F
Copy link
Owner

3F commented Dec 14, 2019 via email

@Executor-Cheng
Copy link
Author

Sorry, I made a mistake. It seems that the bug is related to DllExportAttribute.CallingConvention property.
Modify this property will cause the bug.

[DllExport("test123")] // Correct
[DllExport("test123", CallingConvention.Cdecl)] // Incorrect
[DllExport("test123", CallingConvention = CallingConvention.Cdecl)] // Incorrect

Previous version is ok.

3F added a commit that referenced this issue Dec 14, 2019
@3F
Copy link
Owner

3F commented Dec 14, 2019

@Executor-Cheng, Please confirm fixes using the following CI build: https://ci.appveyor.com/project/3Fs/dllexport-ix27o/builds/29539703/artifacts

I'll try to prepare new release ASAP.

@Executor-Cheng
Copy link
Author

Great! The problem has been solved! Thank you for your quick fix :)

3F added a commit that referenced this issue Dec 15, 2019
* FIXED: Mismatch of the name of the exported function with the specified value.
         Issue #129.

* FIXED: Unchangeable cdecl convention. Part of Issue #129.

* FIXED: Fixed possible duplication of `DllExportSysObjRebase` during setup.

* NEW: Implemented "Single + Double Inf/-Inf token patching" option.
       Related Issue #128.

* KNOWN: You can finally get another System.Object in modified assembly:
         #90 (comment)

* NOTE: Please don't use beta releases in production!

* NOTE: Please report about something here: https://github.com/3F/DllExport/issues
@3F
Copy link
Owner

3F commented Dec 15, 2019

Done. Please use Beta3 release.

@3F 3F closed this as completed Dec 15, 2019
@3F 3F added this to the 1.7 milestone Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants