0

I made a library which used c# GDI+.

And now I want it can be reference and use by any other program language(such as java/c++)

But I don't want to rewrite it by each program language. It is there any way for me only code once by c# and can be use to any other program language?

Thank you.

Melon NG
  • 2,568
  • 6
  • 27
  • 52
  • 1
    Possible duplicate of [Is is possible to export functions from a C# DLL like in VS C++?](https://stackoverflow.com/questions/4818850/is-is-possible-to-export-functions-from-a-c-sharp-dll-like-in-vs-c) – nalnpir May 31 '19 at 01:51
  • @nalnpir But how can it use in any other program language, such as java? – Melon NG May 31 '19 at 02:24
  • @MelonNG your question needs to be more specific, there is no general solution. Each language can have a different solution so you should specify what exactly you need. Providing some sort of C-like exports can help you supporting many languages. – Enes Sadık Özbek May 31 '19 at 02:50

1 Answers1

1

You can use DllExport to generate exports like you would do with for example C. Any language that has some form of C bindings can then call your exported functions.

Enes Sadık Özbek
  • 993
  • 10
  • 17