newbie-dll 
Author Message
 newbie-dll

hi.
whats a dll(dynamic link library)?? how is it different than a regular
program? is there any tutorials on the web for creating SIMPLE dlls or
can you give an example??
thanks for any help.
please email responses.
Jay.



Thu, 06 Jan 2000 03:00:00 GMT  
 newbie-dll

Quote:

> hi.
> whats a dll(dynamic link library)?? how is it different than a regular
> program? is there any tutorials on the web for creating SIMPLE dlls or
> can you give an example??  thanks for any help.
> please email responses.

A dynamic link library, is a library of functions that are linked into
your program when you run your program.  This allows one set of
functions to be used by many programs without the need to duplicate the
code.  Under DOS and other primitive Disk Operating Systems, you had to
link every function your program used into your program, this caused a
waste of disk space.  Under Unix, this is not necessary (never has
been), under Windows 3.x, Windows 95, Windows NT, and Windows 98 this is
not necessary either (finally).

To produce .dll's you will need a Windows compatible C compiler (or
other language), Watcom C, Borland C++ Professional, MS Visual C++, Lcc
for Win32s, or Cygnus GCC for Win32s.

Lcc for Win32s can be found at:
   http://www.geocities.com/SiliconValley/Heights/9069/index.html

Cygnus GCC for win32s can be found at:
   http://www.cygnus.com/misc/gnu-win32/

The comercial C compilers can be found at you local computer software
store.

As for information on how to create, you will need to ask on a Windows
specific Newsgroup, such as:

 comp.os.ms-windows.programmer.misc MS/Windows Programming

 Other MS-DOS/Wintel oriented news groups
 -----------------------------------------------------------
 comp.os.ms-windows.programmer.tools.mfc,
 microsoft.public.vc.mfc,
 microsoft.public.win32.programmer.ui,
 microsoft.public.vc.language,
 comp.os.ms-windows.programmer.controls
 comp.os.ms-windows.programmer.graphics
 comp.os.ms-windows.programmer.memory
 comp.os.ms-windows.programmer.misc
 comp.os.ms-windows.programmer.multimedia
 comp.os.ms-windows.programmer.networks
 comp.os.ms-windows.programmer.nt.kernel-mode
 comp.os.ms-windows.programmer.ole
 comp.os.ms-windows.programmer.tools.mfc
 comp.os.ms-windows.programmer.tools.misc
 comp.os.ms-windows.programmer.tools.owl
 comp.os.ms-windows.programmer.tools.winsock
 comp.os.ms-windows.programmer.vxd
 comp.os.ms-windows.programmer.win32
 comp.os.ms-windows.programmer.winhelp

Have fun.

--
********************************************

********************************************
I've never had a humble opinion in my life.
If you're going to have one,
why bother to be humble about it?
                                Joan Baez



Thu, 06 Jan 2000 03:00:00 GMT  
 newbie-dll


scribbled :

Quote:
>hi.
>whats a dll(dynamic link library)?? how is it different than a regular
>program? is there any tutorials on the web for creating SIMPLE dlls or
>can you give an example??
>thanks for any help.
>please email responses.
>Jay.

A DLL is a Dynamic Linked Library, which contains shared code used by
various Windoze programs. The idea is to stop duplicating huge chunks of
code between programs, leading to overbloating (hey, that happens in
Windoze anyway!).

When you have a VB program, it loads VBRUN300.DLL and links it into the
program. This means you have an memory image size of <DLL size> + <your
program> - but it's not like that on disk, because the DLL can be used
by many programs and is only linked into code when it runs.

As to creating DLL files, why?
Get hold of DJGPP <http://www.delorie.com/> and RSXNTDJ - they will help
you create Win32 images and DLL files. But RSXNTDJ is Win95/NT only, and
needs gcc (which DJGPP provides, DJGPP is the DOS port of gcc, and a
damn good compiler).

Also, beware when creating programs that use DLL files with
DJGPP/RSXNTDJ - you need to patch your linker to deal with the
unresolved references (Windoze resolves them at runtime). This is OK,
but if you forget to link in a library that you should have in a regular
DOS program (if you call foo() and forget to link in foo.a) your program
will crash and you won't know why.

So use two linkers :)

BTW, although DLL files have an EXE (MZ) signature, you can't run them.
Rename VBRUN300.DLL to VBRUN300.EXE and run it - it won't work.

You can't create standalone DLL files. No point!
You can, however, use a DLL file from your NewEXE programs.

And you can't load DLL files from OldEXE (DOS) programs.

Stay away from the evils of DLL files and NewEXE. Choose what you know
is right. Choose UNIX :)

--
Revised anti-spam in use : remove X to reply -
'Xnetbook' becomes 'netbook'

Anti-spam thermonuclear warheads cheap at only $300!



Fri, 07 Jan 2000 03:00:00 GMT  
 newbie-dll



Quote:
>A dynamic link library, is a library of functions that are linked into
>your program when you run your program.  This allows one set of
>functions to be used by many programs without the need to duplicate the
>code.  Under DOS and other primitive Disk Operating Systems, you had to
>link every function your program used into your program, this caused a
>waste of disk space.  Under Unix, this is not necessary (never has
>been), under Windows 3.x, Windows 95, Windows NT, and Windows 98 this is
>not necessary either (finally).

This is a misconception. Shared libraries were introduced by Sun. Initially,
it was necessary to statically link all your UNIX libraries. Early UNIX
didn't have niceties like shared libraries, memory mapped files or demand
paging (which came courtesy of BSD).

It's likely that at least UNIX user somewhere disparaged each of these features
at some point until they became available in his or her favorite OS. :)



Fri, 07 Jan 2000 03:00:00 GMT  
 newbie-dll

Quote:

> hi.
> whats a dll(dynamic link library)?? how is it different than a regular
> program? is there any tutorials on the web for creating SIMPLE dlls or
> can you give an example??
> thanks for any help.

Hi Stargazer,

A DLL is mainly somthing very Windows specific. Other oparating systems
support similar concepts, but mostly with slightly different names.
The standard C language has no idea of and support for dynamically
linkable libraries(ie. DLLs).

If Window is really your system, you might want to ask this question in
a newsgroup where the Windows programming experts hang out:

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Fri, 07 Jan 2000 03:00:00 GMT  
 newbie-dll

Quote:

>This is a misconception. Shared libraries were introduced by Sun.
Initially,
>it was necessary to statically link all your UNIX libraries. Early UNIX
>didn't have niceties like shared libraries, memory mapped files or demand
>paging (which came courtesy of BSD).

>It's likely that at least UNIX user somewhere disparaged each of these
>features
>at some point until they became available in his or her favorite OS. :)

I was using shared libraries on an IBM 360 in 1977.  That was before UNIX
was invented.  I don't know when they were invented, but it was on or
before 1977.
I'm at home, so I say anything I please.


Sun, 09 Jan 2000 03:00:00 GMT  
 newbie-dll



Quote:

>>This is a misconception. Shared libraries were introduced by Sun.
>Initially,
>>it was necessary to statically link all your UNIX libraries. Early UNIX
>>didn't have niceties like shared libraries, memory mapped files or demand
>>paging (which came courtesy of BSD).

>>It's likely that at least UNIX user somewhere disparaged each of these
>>features
>>at some point until they became available in his or her favorite OS. :)
>I was using shared libraries on an IBM 360 in 1977.  That was before UNIX
>was invented.

Unix was "invented" in 1969 and V1 was running in 1971.

Quote:
> I don't know when they were invented, but it was on or
>before 1977.

I don't think anybody claimed that Unix was the first to have shared
libraries. Its predecessor Multics had just about everything! :-)

--
-----------------------------------------


-----------------------------------------



Sun, 09 Jan 2000 03:00:00 GMT  
 newbie-dll


Quote:

>>It's likely that at least UNIX user somewhere disparaged each of these
>>features
>>at some point until they became available in his or her favorite OS. :)
>I was using shared libraries on an IBM 360 in 1977.  That was before UNIX
>was invented.  I don't know when they were invented, but it was on or
>before 1977.

BZZT. UNIX was alive and kicking in 1977 for about 7 years already. Work on
it started around 69 or 70, and by 1974 the C language was developed and
UNIX was rewritten in it.

But you are right; dynamic libraries and memory mapping techniques go back
farther.  UNIX was inspired by Multics, an OS in which just about every system
object is a virtual memory mapping.



Mon, 10 Jan 2000 03:00:00 GMT  
 newbie-dll

Kaz correctly clobbered my cringing quote:

Quote:
>BZZT. UNIX was alive and kicking in 1977 for about 7 years already. Work
on
>it started around 69 or 70, and by 1974 the C language was developed and
>UNIX was rewritten in it.

Augghh!  Do I feel stupid.  I think I need a vacation.  I really did know
that, believe it or not.

I'm at home, so I say anything I please.



Tue, 11 Jan 2000 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Newbie DLL question

2. Newbie: DLL return string to VB?

3. Newbie: DLL return string? - [off-topic redirect]

4. Newbie DLL Question VC++ 6 and VB 6

5. HELP!!! Newbie DLL problems

6. Newbie DLL question

7. Newbie: DLL problems Please Help

8. newbie dll question

9. Newbie : DLL Help

10. Newbie: Dll's in C#

11. Newbie question --- ATL dll using Wininet.dll

12. Newbie: Creating a dll?

 

 
Powered by phpBB® Forum Software