[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
DLL
DLLs


What is a DLL?

A DLL (Dynamically Linked Library) is a file executed by a program (EXE). A DLL cannot run by itself and must have a parent program to run. A DLL can save RAM usage by being executed by two programs at the same time. Unfortunately, DLLs can only be run with a windows system.

Creating a DLL

I am only familar with creating a DLL with C and C++, so I can't help all you people using other programming languages, such as Fortan. Most C/C++ compilers have the ability to create a DLL Project. Make your functions, classes, and structures; defining functions like this:

__declspec(dllexport) int CALLBACK myfunction(int arguments) { //C/C++ code here }

Compile the DLL.

Now create a program to run the DLL. IT MUST BE A WINDOWS APPLICATION! Include the header file (.h) in program like this:

  1. include "myDirectory/myHeader.h"
Then insert the library (.a/.lib) that was created when you compiled the DLL. Put the DLL in the same directory as the program. Now compile your program. You just created your own DLL!

last edited (January 2, 2006) by luhnth, Number of views: 1099, Current Rev: 1

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.