views:

212

answers:

3

Is there a way to group a bunch of DLL's and still use them at run time (not zipped up). Sorry this question sounds terse and stupid, but I'm not sure what more to ask.

I'll explain the situation though:

We've had two standalone Windows Applications and now one of our Applications has swelled to such ungainly proportions that the other application cannot run outside of the scope of the first app. We want to maintain some of the encapsulation we had while letting the smaller program in on some of the bigger program's features.

There is no problem in running the application, other than we don't want to send out all the 20-30 DLL's that the smaller project has.

+3  A: 

If you have a situation where most, or all, of those assemblies have to be kept together, then I would highly recommend just merging the code files into the same project and recompiling. This would leave you with one assembly.

Of course there are other considerations like compile time, overall size of the final dll, how often various pieces change, and whether each component is deployed without the others.

One example of a company that did this is Telerik. Their dev components are all compiled into the same assembly. This makes deployment an absolute breeze. Contrasting that is Dev Express which put just about each control into it's own assembly. Because of this just maintaining, much less deploying, a Dev Express project is not something for the faint of heart.

(I don't work for either of those companies. However, I have a lot of experience with both toolkits.)

Chris Lively
They're not using assemblies, it's not .NET. (You're answer still applies though.)
Zifre
+4  A: 

It is possible to do this by adding startup code which checks if the DLLs are present on the target system and if not then extracts them from the resources section (or simply tagged onto the end of the exe). A good example of this being done is Process Explorer - it's distributed as a single binary, but when run it extracts and installs a driver.

BruceCran
+3  A: 

You could store the DLLs as Resources, and use BTMemoryModule, which essentially allows you to LoadLibrary on a Stream.

That way you could compile-in the multiple DLLs straight into the EXE or into a single resource DLL.

see http://www.jasontpenny.com/blog/2009/05/01/using-dlls-stored-as-resources-in-delphi-programs/

jasonpenny