How to use a class in DLL?

If you use run time dynamic linking (uses LoadLibrary to load the dll) you cannot access the class directly, you need to declare a interface for your class and create a function that returns a instance of this class, like this: class ISDLConsole { public: virtual void getInfo(int,int) = 0; virtual void initConsole(char*, char*, SDL_Surface*, … Read more

How to build a DLL version of libjpeg 9b?

Published builds (static / dynamic) on [GitHub]: CristiFati/Prebuilt-Binaries – (master) Prebuilt-Binaries/LibJPEG. Like almost all of the nowadays software, LibJPEG is also hosted on [GitHub]: winlibs/libjpeg – libjpeg-9b. I downloaded it from both places, did a comparison and only few minor differences (out of which none in the source code) popped up. I’m going to explain … Read more

Is is possible to export functions from a C# DLL like in VS C++?

Unmanaged Exports => https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports DLLExport => https://github.com/3F/DllExport How does it work? Create a new classlibrary or proceed with an existing one. Then add the UnmanagedExports Nuget package. This is pretty much all setup that is required. Now you can write any kind of static method, decorate it with [DllExport] and use it from native code. … Read more