I need to implement a minimalistic osgi-like modularization framework in C++ on Windows. Similar to Java, I want to ship modules as self-contained units, as dynamic link libraries. While .jar files are actually containers, .dll file are really some chunks of compiled code. Is it therefore even possible to store metadata inside a .dll file and access it in a C++ program?
I need to implement a minimalistic osgi-like modularization framework in C++ on Windows. Similar
Share
The simplest way to do this is to store metadata as resources inside DLLs. You can then use the Windows API resource functions to extract the metadata. You don’t even need to load the DLL as a code module, you can just load it as a data module, and then extract the metadata resources.
Use
LoadLibraryto, well, load a library. Then you can useFindResourceandLoadResourceto extract your metadata.