Problem with function (only work in windows, netcore)

04/29/2020 00:29 darkhc#1
I am working in a .Net Core version of WorldConquer Source but i have 1 problem for do this (the other problems are solved).

Need alternative of using this function CAST_set_key and others of same library (See image for details) because this function is using a libeay32 library but only work in windows. Any ideas?

I tried with a CO2_CORE_DLL for this but not working (maybe I don't know how to use it well)

[Only registered and activated users can see links. Click Here To Register...]
04/29/2020 01:30 Spirited#2
.NET Core is cross-platform. It's not going to allow you to import a DLL that's been compiled for a specific native architecture and operation system. CAST-5 in CO2_CORE_DLL worked for me, but I had to take it out of the framework and rewrite it. That style of unsafe and kernel level allocation isn't going to work for .NET Core, nor is it recommended for C# in general (I don't fault him, of course - I was doing that 7 years ago as well).
04/29/2020 12:23 darkhc#3
Quote:
Originally Posted by Spirited View Post
.NET Core is cross-platform. It's not going to allow you to import a DLL that's been compiled for a specific native architecture and operation system. CAST-5 in CO2_CORE_DLL worked for me, but I had to take it out of the framework and rewrite it. That style of unsafe and kernel level allocation isn't going to work for .NET Core, nor is it recommended for C# in general (I don't fault him, of course - I was doing that 7 years ago as well).
So the best thing I can do is make the CO2_CORE_DLL library compatible with netcore? Thanks for your answers