how to pass method handle to dll?

mc 5,426 Reputation points
2023-10-09T09:20:26.4466667+00:00

what I want to do is use a dll which write in c++.

I want to pass an event-handler or a method to the dll and when it run the dll will call the event-handler.

function my_func()
{
Console.WriteLin("i am called");
}
[DllImport("my-dll.dll")]
public extern static registerFunc();
Developer technologies | C#
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.