1

I have a C++ class which does network communications, and wish to use it in a C# application. However I wish to be able to have delegates pointing to the functions so that they can be used as callbacks. Does this change anything about the way I need to export the C++ dll?

2
  • this might help Commented Feb 29, 2012 at 9:50
  • Apologies if the question was not clear enough but what I want is for the C++ functions to be used as callbacks with delegates in the C# app, not the other way around. I don't know whether this requires any extra work when exporting the functions. Commented Feb 29, 2012 at 12:09

1 Answer 1

0

This is how I would do it. Export the functions you need to call from the DLL as C functions and provide some delegates wrapper thing in your C# code.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.