|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
.dll files
I wasn't sure exaticly what forum to post this in, so I just kinda went with this one.....
What, exactely, are dll files? How do you create them? How do you use them? All I know is that they hold "chunks" of code so that the origonal EXE doesn't have to, and it can summon each "chunk" as it needs to...... But how would I create one? And how could I use one once I do? Thanx, I'm really ignorant on this subject.....
__________________
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started. - Why know the ordinary when you can understand the extraordinary? - Sponsor my caffeine addiction! (36.70 USD recieved so far -- Latest donor: Mark Foxvog) |
|
#2
|
||||
|
||||
|
I'm not an expert on this, by any means, but I have made them before. But with VB and VC++. And it's been years.
DLL stand for "Dynamic Link Library". If you've made activeX applications or controls, it's very similar. You make a control with all the functions you want. The control is part of a project with a "main" executable, which you use to test your control. After all the functions work properly, you remove the "main" and compile as a DLL. You'll have to check with your compiler to see if it has that option.
__________________
"Science is constructed of facts as a house is of stones. But a collection of facts is no more a science than a heap of stones is a house." - Henri Poincare |
|
#3
|
||||
|
||||
|
Ok, that makes sense......
![]() |
|
#4
|
||||
|
||||
|
Also, it should be noted that with .dll (Win32) and .so (*nix), a function written in programming language X can be called from programming language Y, so long as the program in Y uses the same calling routine (such as function name, parameter types and count, return type, etc.)
For instance, I could put the following C++ function in a .dll (DLL export code not shown): Code:
/* This function is in C++. */
int recursiveSum(int n)
{
if(n <= 1) {
return n;
}
return n + recursiveSum(n - 1);
}
Code:
{ This is a Pascal code snippet. }
var i: Integer;
I := recursiveSum(100)
writeln('I is ', I);
Quote:
(Please note that I did not include function import/export code because I ams till learning it )
__________________
~~ Peter ~~ ( My Blog: It's exactly like normal nerdiness, but completely different. ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) |
|
#5
|
||||
|
||||
|
Quote:
You're still learning new stuff with Pascal? Is Pascal even used much any more? BTW: I was watching Jurasic Park with my wife last night when they showed a screen shot of Nedry's code. I HAD to pause the movie and zoom in on it to see what language they used. It was hard to read, but it was obviously Pascal. (Who else uses "BEGIN..END" and "x:=y") |
|
#6
|
||||
|
||||
|
>> You're still learning new stuff with Pascal? Is Pascal even used much any more?
You bet! It's still used in Introductory Programming Courses and then there's Object Pascal which is what Delphi uses. We even have a Delphi forum here on devshed .As for DLLs, the whole idea was to put commonly used routines in a shared library -- that way your individual executables would be smaller as the shared routines would all be put in one common place. For example, just about every Windows program has an Open File and Save File dialog. Notice that the dialogs look exactly the same for different applications -- this is because they're using the same functions from commdlg.dll. The first time a program that requires this library runs, this library is loaded into RAM by the OS. Now if you run another program simultaneously, the OS notices that this library is already loaded and hence it does NOT load another copy -- instead, the library is shared between the two applications. The OS keeps the library loaded in memory until all applications that require it stop running. Back in the good old days when memory was expensive, this actually helped load more programs into memory without swapping.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > .dll files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|