-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add custom entry resolver when using DllImportAttribute
#1906
Comments
Could you please explain why you need to dynamically change the names of the native entrypoints? Why can't the code have the right names of the entrypoints in the first place? |
I don't want to change the entry point dynamically. |
It can also be used to mock some missing/unsupported entry point. |
I believe it would also be useful to pass in the // use SDL_GL_GetProcAddress instead of wglGetProcAddress
[GLImportOptions(GLImportOptions.SDL), DllImport("OpenGL32")]
unsafe static extern void glGenFramebuffers(uint size, uint* frameBuffers); |
You can do this today by wrapping the pointer using a delegate. C# 9 is adding support for function pointers that will allow it without the delegate overhead. |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
It will be great to add method for setting custom entry resolver when loading native libraries using
DllImportAttribute
.Example:
The text was updated successfully, but these errors were encountered: