-
Notifications
You must be signed in to change notification settings - Fork 5k
[WASM] callback fron native code to .Net: Parsing function pointer types in signatures is not supported #56145
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
Comments
Tagging subscribers to this area: @vitek-karas, @agocke Issue DetailsI'm trying to do a call from .Net a native function which call backs to .Net. I'm using function pointers as suggested in discord channel, but I'm getting the following error (maybe related to #43791?):
This are the most relevants parts of the code: [DllImport(DllName)]
public static extern unsafe void callCbk(delegate*<void> cbk); typedef void (*callback)(void);
void callCbk(callback cbk)
{
cbk();
} And I'm using version
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsI'm trying to do a call from .Net a native function which call backs to .Net. I'm using function pointers as suggested in discord channel, but I'm getting the following error (maybe related to #43791?):
This are the most relevants parts of the code: [DllImport(DllName)]
public static extern unsafe void callCbk(delegate*<void> cbk); typedef void (*callback)(void);
void callCbk(callback cbk)
{
cbk();
} And I'm using version
|
Just for reference, I modified the test to use "old delegates" and MonoPInvokeCallback attribute and it is working, |
@akoeplinger, what is the status on this one? |
It's blocked by #69273, which is scheduled for 7.0. |
Moving to 8.0 as the required API has moved. |
@emepetres can you give an example of what one actually needs to do? I'm a novice C# programmer. |
@devshgraphicsprogramming check my samples, you can find how to do this with MonoPInvokeCallback there. |
Its a small world of dependencies, this essentially renders SWIG's Cross Language Polymorphism (Directors) feature unusable: Which we really need because C++ interfaces with JS (embind) bindings from which C# inherits is how we're working around: |
Still blocked until we can update |
An alternative would be to rewrite manage to native generator to use |
I'm trying to do a call from .Net a native function which call backs to .Net. I'm using function pointers as suggested in discord channel, but I'm getting the following error (maybe related to #43791?):
This are the most relevants parts of the code:
And I'm using version
The text was updated successfully, but these errors were encountered: