I'll explain what I want, and then I'll explain how I'm trying to achieve it. I want to know if I'm gonig about this the right way, or if there is something much easier.
What I want: a self-extracting executable that happens to ALSO have an additional entry point (which makes the executable suitably usable as if it were a DLL). The additional entry point must not be part of the compressed payload. The entry point, strangely enough, will not execute any LZMA functions (please don't ask why...long story). FYI: making an executable with a DLL entry point is a trivial matter - I already know how to do that.
How I'm pursuing this: I've downloaded the LZMA SDK and will build my own C++ self-extractor. There appears to be no LZMA API documentation. Evidentally, if I want to learn how to use LZMA I must read either .\C\util\7z\7zmain.c or .\cpp\7zip\bundles\lzmaCon\lzmaAlone.cpp. I don't know if studying those is the fastest learning tool.
Once I create the self-extraction code, then I will add the DLL entry point I need and build. The resulting EXE self-extractor I will concatenate with a zip file (a DOS command should suffice to concatenate the two files). This should achieve my goal.
Thoughts?
p.s. Incidentally, I've partly done this years before. I had made a self-extractor (in C# I think) executable, which I then concatenated with a zip file (via a DOS command). Voila, a self-extracting zip executable emerged. What makes my current effort different is that now I'm using C++, and I need this additional / arbitrary DLL entry point.
Why jam the two kinds of functionality together? Why don't you just make a dll and an executable that uses it.