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

improve(ext/ffi) - allow alias for symbol renames to solve Windows DLL import issues. #13327

Closed
cryptographix opened this issue Jan 10, 2022 · 2 comments

Comments

@cryptographix
Copy link
Contributor

cryptographix commented Jan 10, 2022

A number of Microsoft windows DLL's contain two entry points for effectively the same function, with "A" and "W" prefixes to indicate normal (ANSI) or wide strings, for example: winscard.h

The windows import headers .h automatically select between the two variants.

Problem: linux/os-x versions of this library do not have these suffixes, thus making the symbols hash of Deno.dlopen somewhat complicated.

Solution: Add an alias?: string to ForeignFunction, which if set would indicate the symbol name to be imported from the library. This might also help in other cases, such as imported C++ dlls where the symbol names have been munged by the compiler.

@DjDeveloperr
Copy link
Contributor

#13090 implements this (with the only difference being new property is name instead of alias)

@cryptographix
Copy link
Contributor Author

#13090 implements this (with the only difference being new property is name instead of alias)

Ops. Sorry. Did an issue search beforehand but didn't catch it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants