0

I learned Arrays, Functions, Pointers, Classes and Structures. Now I am ready to move on. My question is, What is the difference between a DLL and an API, and how does one access a DLL in a C++ program? Can someone give an example on how to do it please? and why would anybody want to do this?


Thanks,

3
Contributors
2
Replies
4
Views
11 Years
Discussion Span
Last Post by Ancient Dragon
0

API (Application Program Inerface) allows your program to access operating system functions, or functions in a library that may have been written by someone else. For example, the functions sleep(1000), a *nix API function, and Sleep(1000), a MS-Windows function (note spelling capatilization differences). They may be implemented in either a DLL (MS-Windows), shared library (*nix version of a dll), or a statically linked library (both MS-Windows and *nix have them).

Short anwer: a DLL contains pre-compiled implementation code for API functions.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.