Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: Dynamic Link Libraries
Next Lesson: The Contents of a DLL

Linking Libraries

When you create an executable program, you need to link the libraries that you are using to your source programs. You can do this in two ways: statically or dynamically.

Static Linking

If you use the static linking method, all functions from the library that are referenced in the program become part of the executable. This means that you get a large executable file that requires more RAM and disk space. A large executable file takes more time to load into memory. If you create ten different programs that use the same library, the functions in the library will be copied into ten executables. Executing all these programs takes more memory. Also, with static linking, code can't be shared between applications.

Dynamic Linking

With dynamic linking, the functions in the library aren't part of the executable file. Instead, the executable file contains references to the functions. This means that even if you create ten different programs that use the same library, you only need to create one DLL, so you save memory and disk space. At execution time, DLLs are loaded into memory once and can be shared between programs. A program can even unload the DLL if it's not needed at any given point in time and thus free up some memory. A DLL's primary purpose is to reduce the load image of an EXE as well as share resources across multiple EXEs or instances of an EXE. One more thing to note is that you can update these DLLs without relinking, since the executable contains references, not the actual code.

To run a program that uses a dynamic library, the library must be present on the disk, in either the current directory, a directory accessible through the PATH string in MS-DOS, the Windows directory, or the SYSTEM sub-directory of the Windows directory.
HomePrevious Lesson: Dynamic Link Libraries
Next Lesson: The Contents of a DLL

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com