Hi Hans-7890,
I found a similar issue on stack overflow: How to pass function pointer from C# to a C++ Dll?, maybe it could help you.
And since this issue is more related to Visual C#, which is not supported in Microsoft Q&A forum currently. We recommend you could go to msdn forum: Visual C#, and the community members will provide dedicated support for you.
Best Regards,
Dylan
---
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.