Is it possible to share an enum declaration between C# and unmanaged C++?

后端 未结 5 1570
遥遥无期
遥遥无期 2020-12-05 07:39

Is there a way to share an enum definition between native (unmanaged) C++ and (managed) C#?

I have the following enum used in completely unmanaged code:



        
5条回答
  •  情话喂你
    2020-12-05 08:33

    You can expose the C# library to COM and then import the type library into the unmanaged code - this way you will be able to use the enum defined in C# library in the unmanaged library.

提交回复
热议问题