Application can call a DLL function in two ways.
- Implicit Call
- Explicit Call
Implicit Calling: When application or client uses its import table to call the external symbol/functions, it is called implicit call. In implicit call application use prototype header and import library to link an external symbol.
Suppose math library has a import function add()
int c = add(a, b);
Explicit Calling: When application does not links the external symbol by import library rather it loads the DLL at runtime. It does the same mechanism as operating system does during loading of the implicit linked DLL calls.
This is done by using Win32 APIs like :
- LoadLibrary() - loads and links a input library form the DLL path, or current path,
- GetProcAddress() - finds the symbol/function address by its name for a loaded DLL
- FreeLibrary() - unloads the loaded DLL instance
/*Example of Explicit Call*/
typedef (add_proc)(int a, int b);
int main(int argc, char *argv)
int a = 1, b = 2, c;
h_dll = LoadLibrary("math.dll");/*Explicit Load*/
add = GetProcAddress(h_dll, "add");
c = add(a, b); /*Explicit Call*/
printf("add() not found in math.dll");
printf("Unable to load math.dll");
You have viewed 1 page out of 27. Your DLL learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
DLL Frequently Asked Questions
Frequently Asked Questions - DLL-files.com
Dependency Walker Frequently Asked Questions (FAQ)
Top 10 DLL Questions !
DLL COM DCOM Interview Questions and Answers
| #1 webmaster Thu 27 Feb/2014 20:46:29(GMT) || 0 || 0|
We are pleased to inform you that a forum/blog has been incorporated with www.mybestnotes.co.in. You are welcomed to add your comments, requests, codes, solutions and feedback to it. Please login(if already a member) or signup(for free) to avail to this facility.
Your message goes here: