Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use part of a DLL?

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
Is there any way of packaging part of a DLL or do I always have to package the whole thing?
Say I had a simple program with only a form and text boxes, can I have a tiny DLL that only has the needed bits?
 
Wouldn't you only include the functions you need in a DLL?

Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
ummm....
To USE only part of a dll, Craig is right...

However... to PACKAGE a program... the whole DLL is required in the package no matter if you use only 1 function or all of the functions and subs in the DLL... the whole dll is required for Package and Deploy process...

this goes back to the theory of the design of the DLL's ...

They were intended to break down a huge program into smaller parts that can be used by multiple programs, dynamically... which means they do not have to be linked during compilation to create the EXE...

In doing this you want to DLL's by sometype of categories...

where the functions are all related in some way...
You don't want to dump your whole program into 1 DLL...
You want to split it up into several DLL's with related functions...

this way, you don't have to worry about the problem of packaging a 10meg DLL and only using 100k of it in your program...

like USER32 and GDI32 ... those 2 are "usually" used together... but you CAN use one without the other... so you wouldn't have to package 1 big DLL when you are using only half of the stuff in it...

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
Agree'd

I'd say if you had 2 versions of a program, 1 version is a bsic free version, and the other is the advanced paid for version.

You should make the program run with 2 DLL's. DLL #1, would be basic functions. DLL #2 would be the advanced functions.

Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
If you are asking if you can split a DLL into smaller DLLs, I'm not sure if you can do this without the source code...

I believe there are some issues of copywrites... that avoid making this possible... To where you could rip off a few functions from a commercial DLL and put them in your own and say that you made them, without paying for them...

If you DO have the source code...
I STRONGLY suggest spliting it up into smaller ones...

Good Luck

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
Thanks for the comments everyone.
What I want to do is to package a very small app for sale on the internet ((its Exe is only 32k)and it only uses form,text box, label and oval shape controls.
It is an idea that millions of people could find useful.
If I can sell 100,000 for $5 each I will be very happy!
I want to make the download zip file as small as possible so I wondered if there was some utility that would create a DLL that only contained the vital bits as it could be much smaller.
C++ does this in effect with its library but I dont want to have to struggle anymore with that!
You would think all copies of windows would already have some of them but the package ends up over 1mb big.
Ted

 
Does the program use Standard window controls ONLY?

if so...

make 2 packages...

1 with a zip of ONLY the EXE file... (this is the purchased file)

and the other... a free Dummy Package containing the required DLLs in case they are missing a few or have outdated DLLs...

Good Luck

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
Taking CubeE101's idea further, is there a way of determining if the required DLL files exist in the user's computer (say a Java thingy or something) before downloading any VB type DLL's or application program?

Then this thingy would only download what was needed.

Also how can you automatically register such seperately downloaded DLLs??
 
If it were me I would write it so I could maintain only one set of code. Turn on the items for those who pay and leave those items unchecked, off, false, or otherwise useless for those who don't fork over the dough, salmolies, casharoonies, or nuggets of gold from their fort knox's.
IMHO

HTH - AntonV
 
Probably not with java...

maybe with Perl, PHP, ASP, or one of the other CGI languages...

Java has TOO many security issues that, I believe, would keep it from returning the data you are talking about...

Though I could be wrong...

There tends to be a way to get around just about anything with computers these days...

Good Luck ;-)

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
So maybe if you tell us what this program is, and does? Just Kidding...

What I suggest for getting the files needed is to Create a Package using the PDW. Then simply look in the CAB file it creates. You can open CAB files with WinZip. That will list all the files that are needed.

Good luck with it.

Craig

"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top