fancycode / MemoryModule

Library to load a DLL from memory.
http://www.joachim-bauch.de/tutorials/loading-a-dll-from-memory/
Mozilla Public License 2.0
2.74k stars 750 forks source link

License clarification #72

Open ianhbell opened 6 years ago

ianhbell commented 6 years ago

Hello! First off, I have to say that this repository has been absolutely amazing for me, allowing me to crack a DLL loading nut that has been bedeviling me for many years. It "just works", which is pretty awesome.

That said, I'm preparing to make publicly available a library that uses MemoryModule quite a bit. I had to revamp the ReadLibrary function to remove the macro definition (yuck), to read something like this

    /// Read the binary data from the shared library file as a blob of memory
    /// Taken from MemoryModule, under MPL 2.0 license
    void* ReadLibrary(const std::string &fname, size_t &pSize) {
        ...
    };

The guts of this function are basically what was in ReadLibrary before with some slight modifications to reduce some code smell.

Now my question is this: although I do not make any other modifications to the MemoryModule code other than making this function derived from your function, I'm a bit unclear on the terms of the MPLv2. I plan to make my library open-source (and therefore this function would be open-source too), which should fulfill the requirements of MPLv2, right? If we are unable to open-source the library, how much disclosure of source is required? I am of course fine with providing the source for MemoryModule, even if I can't provide the source for my library. The plan is to cite your work in our documentation as well.

ianhbell commented 6 years ago

@tobias-loew do you have any opinion on this topic?

AraHaan commented 6 years ago

You dont have to disclose the source, but you could link what commit you use as basis I think so people can download it on github, Also in event you cant open source I think that is ok as well, I used some MPLv2 code before on closed sourced projects and never disclosed the sources to my code. Keep in mind if you have a license file with your compiled binary however to include the license to any other user's code that you use / depend on, even if they have the MIT License. This is so people know what all you used that was not coded by you and also gives them credits for the code (if you modify them you can also explictly say you did as well). That is if I read right from somewhere on this.